Disassembly: 
  L1: 8b ff ?? mov edi, edi
   55 ?? push ebp
   8b ec ?? mov ebp, esp
   83 ec 10 ?? sub esp, 0x10<16>
   56 ?? push esi
   8b 75 0c ?? mov esi, dword ss:[ebp + 12]
   85 f6 ?? test esi, esi
   75 12 ?? jne basic block L5
  
  L2: e8 c3 4b 00 00 ?? call function 0x0040a113
  
  L3: 8b 40 08 ?? mov eax, dword ds:[eax + 8]
   89 45 f4 ?? mov dword ss:[ebp + 0xf4<244,-12>], eax
   e8 6c 4b 00 00 ?? call function 0x0040a0c7
  
  L4: eb 08 ?? jmp basic block L6
  
  L5: 8b 06 ?? mov eax, dword ds:[esi]
   89 45 f4 ?? mov dword ss:[ebp + 0xf4<244,-12>], eax
   8b 46 04 ?? mov eax, dword ds:[esi + 4]
  
  L6: 83 7d f4 00 ?? cmp dword ss:[ebp + 0xf4<244,-12>], 0
   89 45 f0 ?? mov dword ss:[ebp + 0xf0<240,-16>], eax
   75 17 ?? jne basic block L9
  
  L7: 8b 45 08 ?? mov eax, dword ss:[ebp + 8]
   8d 48 bf ?? lea ecx, ds:[eax + 0xbf<191,-65>]
   83 f9 19 ?? cmp ecx, 0x19<25>
   0f 87 c8 00 00 00 ?? ja basic block L28
  
  L8: 83 c0 20 ?? add eax, 0x20<32>
   e9 c0 00 00 00 ?? jmp basic block L28
  
  L9: 53 ?? push ebx
   8b 5d 08 ?? mov ebx, dword ss:[ebp + 8]
   57 ?? push edi
   bf 00 01 00 00 ?? mov edi, 0x00000100<256>
   3b df ?? cmp ebx, edi
   73 1d ?? jae basic block L15
  
  L10: 85 f6 ?? test esi, esi
   75 10 ?? jne basic block L14
  
  L11: 53 ?? push ebx
   e8 dd 41 00 00 ?? call function 0x0040977a
  
  L12: 59 ?? pop ecx
   85 c0 ?? test eax, eax
   75 12 ?? jne basic block L16
  
  L13: e9 86 00 00 00 ?? jmp basic block L24
  
  L14: 8b 46 08 ?? mov eax, dword ds:[esi + 8]
   f6 04 58 01 ?? test byte ds:[eax + ebx * 2], 1
   74 7d ?? je basic block L24
  
  L15: 85 f6 ?? test esi, esi
   75 1b ?? jne basic block L18
  
  L16: 89 5d f8 ?? mov dword ss:[ebp + 0xf8<248,-8>], ebx
   c1 7d f8 08 ?? sar dword ss:[ebp + 0xf8<248,-8>], 8
   e8 ba 40 00 00 ?? call function 0x0040967a
  
  L17: 0f b6 4d f8 ?? movzx ecx, byte ss:[ebp + 0xf8<248,-8>]
   0f b7 04 48 ?? movzx eax, word ds:[eax + ecx * 2]
   25 00 80 00 00 ?? and eax, 0x00008000<32768>
   eb 1c ?? jmp basic block L19
  
  L18: 8b 4e 08 ?? mov ecx, dword ds:[esi + 8]
   89 5d f8 ?? mov dword ss:[ebp + 0xf8<248,-8>], ebx
   c1 7d f8 08 ?? sar dword ss:[ebp + 0xf8<248,-8>], 8
   8b 45 f8 ?? mov eax, dword ss:[ebp + 0xf8<248,-8>]
   25 ff 00 00 00 ?? and eax, 0x000000ff<255>
   0f bf 04 41 ?? movsx eax, word ds:[ecx + eax * 2]
   c1 e8 0f ?? shr eax, 15
   83 e0 01 ?? and eax, 1
  
  L19: 85 c0 ?? test eax, eax
   74 12 ?? je basic block L21
  
  L20: 8a 45 f8 ?? mov al, byte ss:[ebp + 0xf8<248,-8>]
   6a 02 ?? push 2
   88 45 0c ?? mov byte ss:[ebp + 12], al
   88 5d 0d ?? mov byte ss:[ebp + 13], bl
   c6 45 0e 00 ?? mov byte ss:[ebp + 14], 0
   58 ?? pop eax
   eb 0a ?? jmp basic block L22
  
  L21: 33 c0 ?? xor eax, eax
   88 5d 0c ?? mov byte ss:[ebp + 12], bl
   c6 45 0d 00 ?? mov byte ss:[ebp + 13], 0
   40 ?? inc eax
  
  L22: 6a 01 ?? push 1
   ff 75 f0 ?? push dword ss:[ebp + 0xf0<240,-16>]
   8d 4d fc ?? lea ecx, ss:[ebp + 0xfc<252,-4>]
   6a 03 ?? push 3
   51 ?? push ecx
   50 ?? push eax
   8d 45 0c ?? lea eax, ss:[ebp + 12]
   50 ?? push eax
   57 ?? push edi
   ff 75 f4 ?? push dword ss:[ebp + 0xf4<244,-12>]
   6a 00 ?? push 0
   e8 09 40 00 00 ?? call function 0x0040962f
  
  L23: 83 c4 24 ?? add esp, 0x24<36>
   85 c0 ?? test eax, eax
   75 04 ?? jne basic block L25
  
  L24: 8b c3 ?? mov eax, ebx
   eb 12 ?? jmp basic block L27
  
  L25: 83 f8 01 ?? cmp eax, 1
   0f b6 45 fc ?? movzx eax, byte ss:[ebp + 0xfc<252,-4>]
   74 09 ?? je basic block L27
  
  L26: 0f b6 4d fd ?? movzx ecx, byte ss:[ebp + 0xfd<253,-3>]
   c1 e0 08 ?? shl eax, 8
   0b c1 ?? or eax, ecx
  
  L27: 5f ?? pop edi
   5b ?? pop ebx
  
  L28: 5e ?? pop esi
   c9 ?? leave
   c3 ?? ret
  
  