Disassembly: 
  L1: 55 ?? push ebp
   8b ec ?? mov ebp, esp
   53 ?? push ebx
   8b 5d 08 ?? mov ebx, dword ss:[ebp + 8]
   56 ?? push esi
   57 ?? push edi
   8b 7b 10 ?? mov edi, dword ds:[ebx + 0x10<16>]
   8b f1 ?? mov esi, ecx
   8b 4d 0c ?? mov ecx, dword ss:[ebp + 12]
   3b f9 ?? cmp edi, ecx
   73 0b ?? jae basic block L3
  
  L2: 68 18 32 40 00 ?? push 0x00403218<"invalid string position">
   ff 15 64 30 40 00 ?? call dword ds:[0x00403064]
  
  L3: 2b f9 ?? sub edi, ecx
   39 7d 10 ?? cmp dword ss:[ebp + 0x10<16>], edi
   0f 42 7d 10 ?? cmovb edi, dword ss:[ebp + 0x10<16>]
   3b f3 ?? cmp esi, ebx
   75 4c ?? jne basic block L11
  
  L4: 8d 04 0f ?? lea eax, ds:[edi + ecx]
   39 46 10 ?? cmp dword ds:[esi + 0x10<16>], eax
   73 0b ?? jae basic block L6
  
  L5: 68 18 32 40 00 ?? push 0x00403218<"invalid string position">
   ff 15 64 30 40 00 ?? call dword ds:[0x00403064]
  
  L6: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   89 46 10 ?? mov dword ds:[esi + 0x10<16>], eax
   72 18 ?? jb basic block L9
  
  L7: 8b 16 ?? mov edx, dword ds:[esi]
   51 ?? push ecx
   51 ?? push ecx
   8b ce ?? mov ecx, esi
   c6 04 10 00 ?? mov byte ds:[eax + edx], 0
   e8 a8 01 00 00 ?? call function 0x00401c40
  
  L8: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L9: 51 ?? push ecx
   8b d6 ?? mov edx, esi
   51 ?? push ecx
   8b ce ?? mov ecx, esi
   c6 04 10 00 ?? mov byte ds:[eax + edx], 0
   e8 90 01 00 00 ?? call function 0x00401c40
  
  L10: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L11: 51 ?? push ecx
   57 ?? push edi
   8b ce ?? mov ecx, esi
   e8 5e 00 00 00 ?? call function 0x00401b20
  
  L12: 84 c0 ?? test al, al
   74 46 ?? je basic block L24
  
  L13: 83 7b 14 10 ?? cmp dword ds:[ebx + 0x14<20>], 0x10<16>
   72 02 ?? jb basic block L15
  
  L14: 8b 1b ?? mov ebx, dword ds:[ebx]
  
  L15: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   72 04 ?? jb basic block L17
  
  L16: 8b 0e ?? mov ecx, dword ds:[esi]
   eb 02 ?? jmp basic block L18
  
  L17: 8b ce ?? mov ecx, esi
  
  L18: 85 ff ?? test edi, edi
   74 10 ?? je basic block L21
  
  L19: 8b 45 0c ?? mov eax, dword ss:[ebp + 12]
   57 ?? push edi
   03 c3 ?? add eax, ebx
   50 ?? push eax
   51 ?? push ecx
   e8 63 13 00 00 ?? call function 0x00402e4e
  
  L20: 83 c4 0c ?? add esp, 12
  
  L21: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   89 7e 10 ?? mov dword ds:[esi + 0x10<16>], edi
   72 0f ?? jb basic block L23
  
  L22: 8b 06 ?? mov eax, dword ds:[esi]
   c6 04 38 00 ?? mov byte ds:[eax + edi], 0
   5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L23: 8b c6 ?? mov eax, esi
   c6 04 38 00 ?? mov byte ds:[eax + edi], 0
  
  L24: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  