Disassembly: 
  L1: 8b ff ?? mov edi, edi
   55 ?? push ebp
   8b ec ?? mov ebp, esp
   56 ?? push esi
   8b 75 08 ?? mov esi, dword ss:[ebp + 8]
   8b 46 0c ?? mov eax, dword ds:[esi + 12]
   a8 83 ?? test al, 0x83<131,-125>
   75 10 ?? jne basic block L4
  
  L2: e8 90 4e 00 00 ?? call function 0x0040c522
  
  L3: c7 00 16 00 00 00 ?? mov dword ds:[eax], 0x00000016<22>
   83 c8 ff ?? or eax, 0xff<255,-1>
   eb 67 ?? jmp basic block L17
  
  L4: 83 e0 ef ?? and eax, 0xef<239,-17>
   83 7d 10 01 ?? cmp dword ss:[ebp + 0x10<16>], 1
   89 46 0c ?? mov dword ds:[esi + 12], eax
   75 0e ?? jne basic block L7
  
  L5: 56 ?? push esi
   e8 f8 89 00 00 ?? call function 0x004100a7
  
  L6: 01 45 0c ?? add dword ss:[ebp + 12], eax
   83 65 10 00 ?? and dword ss:[ebp + 0x10<16>], 0
   59 ?? pop ecx
  
  L7: 56 ?? push esi
   e8 8a fa ff ff ?? call function 0x00407147
  
  L8: 8b 46 0c ?? mov eax, dword ds:[esi + 12]
   59 ?? pop ecx
   84 c0 ?? test al, al
   79 08 ?? jns basic block L10
  
  L9: 83 e0 fc ?? and eax, 0xfc<252,-4>
   89 46 0c ?? mov dword ds:[esi + 12], eax
   eb 16 ?? jmp basic block L14
  
  L10: a8 01 ?? test al, 1
   74 12 ?? je basic block L14
  
  L11: a8 08 ?? test al, 8
   74 0e ?? je basic block L14
  
  L12: a9 00 04 00 00 ?? test eax, 0x00000400<1024>
   75 07 ?? jne basic block L14
  
  L13: c7 46 18 00 02 00 00 ?? mov dword ds:[esi + 0x18<24>], 0x00000200<512>
  
  L14: ff 75 10 ?? push dword ss:[ebp + 0x10<16>]
   ff 75 0c ?? push dword ss:[ebp + 12]
   56 ?? push esi
   e8 d1 79 00 00 ?? call function 0x0040f0c0
  
  L15: 59 ?? pop ecx
   50 ?? push eax
   e8 d5 88 00 00 ?? call function 0x0040ffcb
  
  L16: 33 c9 ?? xor ecx, ecx
   83 c4 0c ?? add esp, 12
   83 f8 ff ?? cmp eax, 0xff<255,-1>
   0f 95 c1 ?? setne cl
   49 ?? dec ecx
   8b c1 ?? mov eax, ecx
  
  L17: 5e ?? pop esi
   5d ?? pop ebp
   c3 ?? ret
  
  