
L1: 55 ?? push ebp
 8b ec ?? mov ebp, esp
 56 ?? push esi
 8b f1 ?? mov esi, ecx
 8b 46 10 ?? mov eax, dword ds:[esi + 0x10<16>]
 8b 4d 08 ?? mov ecx, dword ss:[ebp + 8]
 57 ?? push edi
 3b c1 ?? cmp eax, ecx
 73 0b ?? jae basic block L3

L2: 68 40 68 40 00 ?? push 0x00406840<"invalid string position">
 ff 15 9c 92 40 00 ?? call dword ds:[0x0040929c]

L3: 8b 7d 0c ?? mov edi, dword ss:[ebp + 12]
 2b c1 ?? sub eax, ecx
 3b c7 ?? cmp eax, edi
 73 02 ?? jae basic block L5

L4: 8b f8 ?? mov edi, eax

L5: 85 ff ?? test edi, edi
 74 51 ?? je basic block L16

L6: 8b 56 14 ?? mov edx, dword ds:[esi + 0x14<20>]
 53 ?? push ebx
 83 fa 10 ?? cmp edx, 0x10<16>
 72 04 ?? jb basic block L8

L7: 8b 1e ?? mov ebx, dword ds:[esi]
 eb 02 ?? jmp basic block L9

L8: 8b de ?? mov ebx, esi

L9: 83 fa 10 ?? cmp edx, 0x10<16>
 72 04 ?? jb basic block L11

L10: 8b 16 ?? mov edx, dword ds:[esi]
 eb 02 ?? jmp basic block L12

L11: 8b d6 ?? mov edx, esi

L12: 2b c7 ?? sub eax, edi
 03 d9 ?? add ebx, ecx
 50 ?? push eax
 03 df ?? add ebx, edi
 03 d1 ?? add edx, ecx
 53 ?? push ebx
 52 ?? push edx
 ff 15 40 93 40 00 ?? call dword ds:[0x00409340]

L13: 8b 46 10 ?? mov eax, dword ds:[esi + 0x10<16>]
 83 c4 0c ?? add esp, 12
 2b c7 ?? sub eax, edi
 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
 89 46 10 ?? mov dword ds:[esi + 0x10<16>], eax
 5b ?? pop ebx
 72 0e ?? jb basic block L15

L14: 8b 0e ?? mov ecx, dword ds:[esi]
 c6 04 01 00 ?? mov byte ds:[ecx + eax], 0
 5f ?? pop edi
 8b c6 ?? mov eax, esi
 5e ?? pop esi
 5d ?? pop ebp
 c2 08 00 ?? ret 8

L15: 8b ce ?? mov ecx, esi
 c6 04 01 00 ?? mov byte ds:[ecx + eax], 0

L16: 5f ?? pop edi
 8b c6 ?? mov eax, esi
 5e ?? pop esi
 5d ?? pop ebp
 c2 08 00 ?? ret 8

