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]
   57 ?? push edi
   a8 83 ?? test al, 0x83<131,-125>
   74 79 ?? je basic block L19
  
  L2: 8b 7d 14 ?? mov edi, dword ss:[ebp + 0x14<20>]
   85 ff ?? test edi, edi
   74 0a ?? je basic block L5
  
  L3: 83 ff 01 ?? cmp edi, 1
   74 05 ?? je basic block L5
  
  L4: 83 ff 02 ?? cmp edi, 2
   75 68 ?? jne basic block L19
  
  L5: 83 e0 ef ?? and eax, 0xef<239,-17>
   89 46 0c ?? mov dword ds:[esi + 12], eax
   83 ff 01 ?? cmp edi, 1
   75 0f ?? jne basic block L8
  
  L6: 56 ?? push esi
   e8 db f8 ff ff ?? call function 0x00415a0f
  
  L7: 01 45 0c ?? add dword ss:[ebp + 12], eax
   59 ?? pop ecx
   11 55 10 ?? adc dword ss:[ebp + 0x10<16>], edx
   33 ff ?? xor edi, edi
  
  L8: 56 ?? push esi
   e8 b6 4e ff ff ?? call function 0x0040aff9
  
  L9: 8b 46 0c ?? mov eax, dword ds:[esi + 12]
   59 ?? pop ecx
   84 c0 ?? test al, al
   79 08 ?? jns basic block L11
  
  L10: 83 e0 fc ?? and eax, 0xfc<252,-4>
   89 46 0c ?? mov dword ds:[esi + 12], eax
   eb 16 ?? jmp basic block L15
  
  L11: a8 01 ?? test al, 1
   74 12 ?? je basic block L15
  
  L12: a8 08 ?? test al, 8
   74 0e ?? je basic block L15
  
  L13: a9 00 04 00 00 ?? test eax, 0x00000400<1024>
   75 07 ?? jne basic block L15
  
  L14: c7 46 18 00 02 00 00 ?? mov dword ds:[esi + 0x18<24>], 0x00000200<512>
  
  L15: 57 ?? push edi
   ff 75 10 ?? push dword ss:[ebp + 0x10<16>]
   ff 75 0c ?? push dword ss:[ebp + 12]
   56 ?? push esi
   e8 fd ee ff ff ?? call function 0x00415073
  
  L16: 59 ?? pop ecx
   50 ?? push eax
   e8 ef c4 00 00 ?? call function 0x0042266c
  
  L17: 23 c2 ?? and eax, edx
   83 c4 10 ?? add esp, 0x10<16>
   83 f8 ff ?? cmp eax, 0xff<255,-1>
   74 0f ?? je basic block L21
  
  L18: 33 c0 ?? xor eax, eax
   eb 0e ?? jmp basic block L22
  
  L19: e8 07 7f ff ff ?? call function 0x0040e097
  
  L20: c7 00 16 00 00 00 ?? mov dword ds:[eax], 0x00000016<22>
  
  L21: 83 c8 ff ?? or eax, 0xff<255,-1>
  
  L22: 5f ?? pop edi
   5e ?? pop esi
   5d ?? pop ebp
   c3 ?? ret
  
  