Disassembly: 
  L1: 8b ff ?? mov edi, edi
   55 ?? push ebp
   8b ec ?? mov ebp, esp
   83 ec 18 ?? sub esp, 0x18<24>
   53 ?? push ebx
   ff 75 10 ?? push dword ss:[ebp + 0x10<16>]
   8d 4d e8 ?? lea ecx, ss:[ebp + 0xe8<232,-24>]
   e8 f2 0d ff ff ?? call function 0x00408349
  
  L2: 8b 5d 08 ?? mov ebx, dword ss:[ebp + 8]
   8d 43 01 ?? lea eax, ds:[ebx + 1]
   3d 00 01 00 00 ?? cmp eax, 0x00000100<256>
   77 0f ?? ja basic block L4
  
  L3: 8b 45 e8 ?? mov eax, dword ss:[ebp + 0xe8<232,-24>]
   8b 80 c8 00 00 00 ?? mov eax, dword ds:[eax + 0x000000c8<200>]
   0f b7 04 58 ?? movzx eax, word ds:[eax + ebx * 2]
   eb 75 ?? jmp basic block L14
  
  L4: 89 5d 08 ?? mov dword ss:[ebp + 8], ebx
   c1 7d 08 08 ?? sar dword ss:[ebp + 8], 8
   8d 45 e8 ?? lea eax, ss:[ebp + 0xe8<232,-24>]
   50 ?? push eax
   8b 45 08 ?? mov eax, dword ss:[ebp + 8]
   25 ff 00 00 00 ?? and eax, 0x000000ff<255>
   50 ?? push eax
   e8 d3 f5 ff ff ?? call function 0x00416b5f
  
  L5: 59 ?? pop ecx
   59 ?? pop ecx
   85 c0 ?? test eax, eax
   74 12 ?? je basic block L7
  
  L6: 8a 45 08 ?? mov al, byte ss:[ebp + 8]
   6a 02 ?? push 2
   88 45 f8 ?? mov byte ss:[ebp + 0xf8<248,-8>], al
   88 5d f9 ?? mov byte ss:[ebp + 0xf9<249,-7>], bl
   c6 45 fa 00 ?? mov byte ss:[ebp + 0xfa<250,-6>], 0
   59 ?? pop ecx
   eb 0a ?? jmp basic block L8
  
  L7: 33 c9 ?? xor ecx, ecx
   88 5d f8 ?? mov byte ss:[ebp + 0xf8<248,-8>], bl
   c6 45 f9 00 ?? mov byte ss:[ebp + 0xf9<249,-7>], 0
   41 ?? inc ecx
  
  L8: 8b 45 e8 ?? mov eax, dword ss:[ebp + 0xe8<232,-24>]
   6a 01 ?? push 1
   ff 70 14 ?? push dword ds:[eax + 0x14<20>]
   ff 70 04 ?? push dword ds:[eax + 4]
   8d 45 fc ?? lea eax, ss:[ebp + 0xfc<252,-4>]
   50 ?? push eax
   51 ?? push ecx
   8d 45 f8 ?? lea eax, ss:[ebp + 0xf8<248,-8>]
   50 ?? push eax
   8d 45 e8 ?? lea eax, ss:[ebp + 0xe8<232,-24>]
   6a 01 ?? push 1
   50 ?? push eax
   e8 a9 db ff ff ?? call function 0x00415176
  
  L9: 83 c4 20 ?? add esp, 0x20<32>
   85 c0 ?? test eax, eax
   75 10 ?? jne basic block L13
  
  L10: 38 45 f4 ?? cmp byte ss:[ebp + 0xf4<244,-12>], al
   74 07 ?? je basic block L12
  
  L11: 8b 45 f0 ?? mov eax, dword ss:[ebp + 0xf0<240,-16>]
   83 60 70 fd ?? and dword ds:[eax + 0x70<112>], 0xfd<253,-3>
  
  L12: 33 c0 ?? xor eax, eax
   eb 14 ?? jmp basic block L16
  
  L13: 0f b7 45 fc ?? movzx eax, word ss:[ebp + 0xfc<252,-4>]
  
  L14: 23 45 0c ?? and eax, dword ss:[ebp + 12]
   80 7d f4 00 ?? cmp byte ss:[ebp + 0xf4<244,-12>], 0
   74 07 ?? je basic block L16
  
  L15: 8b 4d f0 ?? mov ecx, dword ss:[ebp + 0xf0<240,-16>]
   83 61 70 fd ?? and dword ds:[ecx + 0x70<112>], 0xfd<253,-3>
  
  L16: 5b ?? pop ebx
   c9 ?? leave
   c3 ?? ret
  
  