Disassembly: 
  L1: 55 ?? push ebp
   8b ec ?? mov ebp, esp
   53 ?? push ebx
   8b 5d 0c ?? mov ebx, dword ss:[ebp + 12]
   56 ?? push esi
   8b f1 ?? mov esi, ecx
   8b 4d 08 ?? mov ecx, dword ss:[ebp + 8]
   57 ?? push edi
   8b 79 10 ?? mov edi, dword ds:[ecx + 0x10<16>]
   3b fb ?? cmp edi, ebx
   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 45 10 ?? mov eax, dword ss:[ebp + 0x10<16>]
   2b fb ?? sub edi, ebx
   3b c7 ?? cmp eax, edi
   73 02 ?? jae basic block L5
  
  L4: 8b f8 ?? mov edi, eax
  
  L5: 3b f1 ?? cmp esi, ecx
   75 1f ?? jne basic block L9
  
  L6: 6a ff ?? push 0xff<255,-1>
   03 fb ?? add edi, ebx
   57 ?? push edi
   8b ce ?? mov ecx, esi
   e8 6f f1 ff ff ?? call function 0x0040105a
  
  L7: 53 ?? push ebx
   6a 00 ?? push 0
   8b ce ?? mov ecx, esi
   e8 65 f1 ff ff ?? call function 0x0040105a
  
  L8: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L9: 83 ff fe ?? cmp edi, 0xfe<254,-2>
   76 0b ?? jbe basic block L11
  
  L10: 68 5c 68 40 00 ?? push 0x0040685c<"string too long">
   ff 15 98 92 40 00 ?? call dword ds:[0x00409298]
  
  L11: 8b 46 14 ?? mov eax, dword ds:[esi + 0x14<20>]
   3b c7 ?? cmp eax, edi
   73 28 ?? jae basic block L18
  
  L12: 8b 46 10 ?? mov eax, dword ds:[esi + 0x10<16>]
   50 ?? push eax
   57 ?? push edi
   8b ce ?? mov ecx, esi
   e8 f8 f0 ff ff ?? call function 0x00401019
  
  L13: 8b 4d 08 ?? mov ecx, dword ss:[ebp + 8]
   85 ff ?? test edi, edi
   74 68 ?? je basic block L27
  
  L14: b8 10 00 00 00 ?? mov eax, 0x00000010<16>
   39 41 14 ?? cmp dword ds:[ecx + 0x14<20>], eax
   72 02 ?? jb basic block L16
  
  L15: 8b 09 ?? mov ecx, dword ds:[ecx]
  
  L16: 39 46 14 ?? cmp dword ds:[esi + 0x14<20>], eax
   72 2a ?? jb basic block L22
  
  L17: 8b 06 ?? mov eax, dword ds:[esi]
   eb 28 ?? jmp basic block L23
  
  L18: 85 ff ?? test edi, edi
   75 e7 ?? jne basic block L14
  
  L19: 89 7e 10 ?? mov dword ds:[esi + 0x10<16>], edi
   83 f8 10 ?? cmp eax, 0x10<16>
   72 0e ?? jb basic block L21
  
  L20: 8b 06 ?? mov eax, dword ds:[esi]
   5f ?? pop edi
   c6 00 00 ?? mov byte ds:[eax], 0
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L21: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   c6 00 00 ?? mov byte ds:[eax], 0
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L22: 8b c6 ?? mov eax, esi
  
  L23: 57 ?? push edi
   03 cb ?? add ecx, ebx
   51 ?? push ecx
   50 ?? push eax
   e8 b9 03 00 00 ?? call function 0x00402328
  
  L24: 83 c4 0c ?? add esp, 12
   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 L26
  
  L25: 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
  
  L26: 8b c6 ?? mov eax, esi
   c6 04 38 00 ?? mov byte ds:[eax + edi], 0
  
  L27: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  