Disassembly: 
  L1: 8b ff ?? mov edi, edi
   55 ?? push ebp
   8b ec ?? mov ebp, esp
   83 ec 14 ?? sub esp, 0x14<20>
   8b 4d 08 ?? mov ecx, dword ss:[ebp + 8]
   0f b7 51 0a ?? movzx edx, word ds:[ecx + 10]
   83 65 f8 00 ?? and dword ss:[ebp + 0xf8<248,-8>], 0
   53 ?? push ebx
   8b 59 06 ?? mov ebx, dword ds:[ecx + 6]
   56 ?? push esi
   8b 71 02 ?? mov esi, dword ds:[ecx + 2]
   0f b7 09 ?? movzx ecx, word ds:[ecx]
   57 ?? push edi
   8b fa ?? mov edi, edx
   81 e2 00 80 00 00 ?? and edx, 0x00008000<32768>
   8b c2 ?? mov eax, edx
   c1 e1 10 ?? shl ecx, 0x10<16>
   ba 00 00 00 80 ?? mov edx, 0x80000000
   81 e7 ff 7f 00 00 ?? and edi, 0x00007fff<32767>
   89 5d ec ?? mov dword ss:[ebp + 0xec<236,-20>], ebx
   89 4d f4 ?? mov dword ss:[ebp + 0xf4<244,-12>], ecx
   85 ca ?? test edx, ecx
   74 5f ?? je basic block L16
  
  L2: f7 c1 ff ff ff 7f ?? test ecx, 0x7fffffff
   74 57 ?? je basic block L16
  
  L3: 8d 4e 01 ?? lea ecx, ds:[esi + 1]
   33 db ?? xor ebx, ebx
   3b ce ?? cmp ecx, esi
   72 05 ?? jb basic block L5
  
  L4: 83 f9 01 ?? cmp ecx, 1
   73 03 ?? jae basic block L6
  
  L5: 33 db ?? xor ebx, ebx
   43 ?? inc ebx
  
  L6: 83 65 08 00 ?? and dword ss:[ebp + 8], 0
   89 4d f0 ?? mov dword ss:[ebp + 0xf0<240,-16>], ecx
   8b cb ?? mov ecx, ebx
  
  L7: 85 c9 ?? test ecx, ecx
   74 33 ?? je basic block L14
  
  L8: 8b 4d 08 ?? mov ecx, dword ss:[ebp + 8]
   83 65 fc 00 ?? and dword ss:[ebp + 0xfc<252,-4>], 0
   8d 4c 8d ec ?? lea ecx, ss:[ebp + 0xec<236,-20> + ecx * 4]
   8b 31 ?? mov esi, dword ds:[ecx]
   8d 5e 01 ?? lea ebx, ds:[esi + 1]
   3b de ?? cmp ebx, esi
   72 05 ?? jb basic block L10
  
  L9: 83 fb 01 ?? cmp ebx, 1
   73 07 ?? jae basic block L11
  
  L10: c7 45 fc 01 00 00 00 ?? mov dword ss:[ebp + 0xfc<252,-4>], 1
  
  L11: ff 4d 08 ?? dec dword ss:[ebp + 8]
   89 19 ?? mov dword ds:[ecx], ebx
   8b 4d fc ?? mov ecx, dword ss:[ebp + 0xfc<252,-4>]
   79 d2 ?? jns basic block L7
  
  L12: 85 c9 ?? test ecx, ecx
   74 05 ?? je basic block L14
  
  L13: 8b da ?? mov ebx, edx
   47 ?? inc edi
   eb 03 ?? jmp basic block L15
  
  L14: 8b 5d ec ?? mov ebx, dword ss:[ebp + 0xec<236,-20>]
  
  L15: 8b 75 f0 ?? mov esi, dword ss:[ebp + 0xf0<240,-16>]
  
  L16: b9 ff 7f 00 00 ?? mov ecx, 0x00007fff<32767>
   66 3b f9 ?? cmp di, cx
   75 07 ?? jne basic block L18
  
  L17: c7 45 f8 01 00 00 00 ?? mov dword ss:[ebp + 0xf8<248,-8>], 1
  
  L18: 8b 4d 0c ?? mov ecx, dword ss:[ebp + 12]
   0b c7 ?? or eax, edi
   5f ?? pop edi
   89 31 ?? mov dword ds:[ecx], esi
   5e ?? pop esi
   89 59 04 ?? mov dword ds:[ecx + 4], ebx
   66 89 41 08 ?? mov word ds:[ecx + 8], ax
   8b 45 f8 ?? mov eax, dword ss:[ebp + 0xf8<248,-8>]
   5b ?? pop ebx
   c9 ?? leave
   c3 ?? ret
  
  