Disassembly: 
  L1: 8b ff ?? mov edi, edi
   55 ?? push ebp
   8b ec ?? mov ebp, esp
   53 ?? push ebx
   56 ?? push esi
   57 ?? push edi
   8b 7d 0c ?? mov edi, dword ss:[ebp + 12]
   85 ff ?? test edi, edi
   74 17 ?? je basic block L6
  
  L2: 83 7d 10 00 ?? cmp dword ss:[ebp + 0x10<16>], 0
   74 11 ?? je basic block L6
  
  L3: 80 3f 00 ?? cmp byte ds:[edi], 0
   75 13 ?? jne basic block L8
  
  L4: 8b 45 08 ?? mov eax, dword ss:[ebp + 8]
   85 c0 ?? test eax, eax
   74 05 ?? je basic block L6
  
  L5: 33 c9 ?? xor ecx, ecx
   66 89 08 ?? mov word ds:[eax], cx
  
  L6: 33 c0 ?? xor eax, eax
  
  L7: 5f ?? pop edi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c3 ?? ret
  
  L8: 8b 45 18 ?? mov eax, dword ss:[ebp + 0x18<24>]
   85 c0 ?? test eax, eax
   75 0f ?? jne basic block L12
  
  L9: e8 21 50 00 00 ?? call function 0x0040e5b3
  
  L10: 8b 70 08 ?? mov esi, dword ds:[eax + 8]
   e8 cd 4f 00 00 ?? call function 0x0040e567
  
  L11: eb 05 ?? jmp basic block L13
  
  L12: 8b 30 ?? mov esi, dword ds:[eax]
   8b 40 04 ?? mov eax, dword ds:[eax + 4]
  
  L13: 89 45 0c ?? mov dword ss:[ebp + 12], eax
   85 f6 ?? test esi, esi
   75 13 ?? jne basic block L17
  
  L14: 8b 45 08 ?? mov eax, dword ss:[ebp + 8]
   85 c0 ?? test eax, eax
   74 07 ?? je basic block L16
  
  L15: 66 0f b6 0f ?? movzx cx, byte ds:[edi]
   66 89 08 ?? mov word ds:[eax], cx
  
  L16: 33 c0 ?? xor eax, eax
   40 ?? inc eax
   eb c6 ?? jmp basic block L7
  
  L17: ff 75 0c ?? push dword ss:[ebp + 12]
   e8 a8 fe ff ff ?? call function 0x0040946b
  
  L18: 8b 75 14 ?? mov esi, dword ss:[ebp + 0x14<20>]
   83 3e 00 ?? cmp dword ds:[esi], 0
   59 ?? pop ecx
   8b d8 ?? mov ebx, eax
   74 54 ?? je basic block L29
  
  L19: 8a 07 ?? mov al, byte ds:[edi]
   53 ?? push ebx
   88 46 01 ?? mov byte ds:[esi + 1], al
   e8 72 4f 00 00 ?? call function 0x0040e54b
  
  L20: 83 f8 01 ?? cmp eax, 1
   59 ?? pop ecx
   7e 2d ?? jle basic block L26
  
  L21: 33 c0 ?? xor eax, eax
   39 45 08 ?? cmp dword ss:[ebp + 8], eax
   0f 95 c0 ?? setne al
   50 ?? push eax
   ff 75 08 ?? push dword ss:[ebp + 8]
   6a 02 ?? push 2
   56 ?? push esi
   6a 09 ?? push 9
   ff 75 0c ?? push dword ss:[ebp + 12]
   ff 15 20 92 44 00 ?? call dword ds:[0x00449220]
  
  L22: 85 c0 ?? test eax, eax
   74 0f ?? je basic block L26
  
  L23: 83 26 00 ?? and dword ds:[esi], 0
  
  L24: 53 ?? push ebx
   e8 45 4f 00 00 ?? call function 0x0040e54b
  
  L25: 59 ?? pop ecx
   e9 75 ff ff ff ?? jmp basic block L7
  
  L26: 83 26 00 ?? and dword ds:[esi], 0
  
  L27: e8 83 4a 00 00 ?? call function 0x0040e097
  
  L28: c7 00 2a 00 00 00 ?? mov dword ds:[eax], 0x0000002a<42>
   83 c8 ff ?? or eax, 0xff<255,-1>
   e9 5f ff ff ff ?? jmp basic block L7
  
  L29: 85 db ?? test ebx, ebx
   75 13 ?? jne basic block L32
  
  L30: e8 8a 54 00 00 ?? call function 0x0040eab5
  
  L31: 0f b6 0f ?? movzx ecx, byte ds:[edi]
   0f b7 04 48 ?? movzx eax, word ds:[eax + ecx * 2]
   25 00 80 00 00 ?? and eax, 0x00008000<32768>
   eb 0e ?? jmp basic block L33
  
  L32: 0f b6 07 ?? movzx eax, byte ds:[edi]
   8b 4b 04 ?? mov ecx, dword ds:[ebx + 4]
   0f b6 44 01 1d ?? movzx eax, byte ds:[ecx + eax + 0x1d<29>]
   83 e0 04 ?? and eax, 4
  
  L33: 85 c0 ?? test eax, eax
   74 5b ?? je basic block L44
  
  L34: 53 ?? push ebx
   e8 fa 4e 00 00 ?? call function 0x0040e54b
  
  L35: 59 ?? pop ecx
   39 45 10 ?? cmp dword ss:[ebp + 0x10<16>], eax
   73 0c ?? jae basic block L37
  
  L36: 8a 07 ?? mov al, byte ds:[edi]
   6a fe ?? push 0xfe<254,-2>
   88 06 ?? mov byte ds:[esi], al
   58 ?? pop eax
   e9 1e ff ff ff ?? jmp basic block L7
  
  L37: 53 ?? push ebx
   e8 e2 4e 00 00 ?? call function 0x0040e54b
  
  L38: 83 f8 01 ?? cmp eax, 1
   59 ?? pop ecx
   7e 28 ?? jle basic block L42
  
  L39: 33 c0 ?? xor eax, eax
   39 45 08 ?? cmp dword ss:[ebp + 8], eax
   0f 95 c0 ?? setne al
   50 ?? push eax
   ff 75 08 ?? push dword ss:[ebp + 8]
   53 ?? push ebx
   e8 ca 4e 00 00 ?? call function 0x0040e54b
  
  L40: 59 ?? pop ecx
   50 ?? push eax
   57 ?? push edi
   6a 09 ?? push 9
   ff 75 0c ?? push dword ss:[ebp + 12]
   ff 15 20 92 44 00 ?? call dword ds:[0x00449220]
  
  L41: 85 c0 ?? test eax, eax
   0f 85 69 ff ff ff ?? jne basic block L24
  
  L42: 80 7f 01 00 ?? cmp byte ds:[edi + 1], 0
   0f 85 5f ff ff ff ?? jne basic block L24
  
  L43: e9 66 ff ff ff ?? jmp basic block L26
  
  L44: 33 c0 ?? xor eax, eax
   39 45 08 ?? cmp dword ss:[ebp + 8], eax
   0f 95 c0 ?? setne al
   50 ?? push eax
   ff 75 08 ?? push dword ss:[ebp + 8]
   6a 01 ?? push 1
   57 ?? push edi
   6a 09 ?? push 9
   ff 75 0c ?? push dword ss:[ebp + 12]
   ff 15 20 92 44 00 ?? call dword ds:[0x00449220]
  
  L45: 85 c0 ?? test eax, eax
   0f 85 ee fe ff ff ?? jne basic block L16
  
  L46: e9 42 ff ff ff ?? jmp basic block L27
  
  