Function at 0x40c135
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x64
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x78]
mov edi, edx
mov ebx, ecx
mov dword [esp + 0x10], eax
push 0x100
call 0x40c331
pop ecx
mov ebp, eax
mov edx, ebx
mov ecx, eax
push edi
call fcn.0040a5e0
pop ecx
test eax, eax
jne 0x40c17b
mov ecx, ebx
mov edx, edi
push dword [esp + 0x80]
push ebp
push 0
call fcn.0042a1e1
mov dword [esp], eax
mov dword [esp + 4], edx
xor edx, edx
xor eax, eax
mov ecx, str._..._begin___end_______when_slicing___
inc edx
cmp ebp, edi
setb al
cmovae ecx, edx
cmp esi, edi
lea eax, [eax + eax*4]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
ja 0x40c1ad
mov eax, dword [esp + 0x10]
cmp eax, edi
jbe 0x40c1fd
mov esi, eax
lea ecx, [esp + 0x44]
lea eax, [esp + 0x1c]
lea edx, [esp + 8]
mov dword [eax], ecx
mov dword [ecx], esi
mov ecx, esp
mov dword [eax + 4], fcn.0040a891
mov dword [eax + 8], ecx
mov ecx, fcn.0040a601
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], edx
mov dword [eax + 0x14], ecx
lea ecx, [esp + 0x4c]
mov dword [ecx], str.byte_index__is_not_a_char_boundary__it_is_inside___bytes___of__
push 3
pop edx
mov dword [ecx + 4], edx
and dword [ecx + 0x10], 0
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov edx, dword [esp + 0x80]
call fcn.00429e70
cmp esi, eax
jbe 0x40c242
lea ecx, [esp + 0x78]
lea eax, [esp + 0x1c]
lea edx, [esp + 0x7c]
mov dword [eax], ecx
mov ecx, fcn.0040a891
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov ecx, esp
lea edx, [esp + 8]
mov dword [eax + 0x10], ecx
mov ecx, fcn.0040a601
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], edx
mov dword [eax + 0x1c], ecx
lea ecx, [esp + 0x4c]
mov dword [ecx], 0x42d01c
push 4
jmp 0x40c1e3
test esi, esi
je 0x40c250
cmp esi, edi
jae 0x40c250
cmp byte [ebx + esi], 0xc0
jl 0x40c252
mov esi, eax
mov dword [esp + 0x14], esi
mov ecx, ebx
mov edx, edi
push esi
call 0x40c331
pop ecx
mov esi, dword [esp + 0x80]
mov ebp, eax
mov ecx, ebx
mov edx, edi
push esi
push eax
call fcn.0040c10f
pop ecx
pop ecx
lea edi, [esp + 0x1c]
add edx, eax
mov ecx, edi
mov dword [edi], eax
mov dword [edi + 4], edx
call fcn.0040fea0
cmp eax, 0x110000
jne 0x40c297
mov ecx, esi
call fcn.0042a10b
cmp eax, 0x80
mov ecx, 1
mov dword [esp + 0x18], eax
jb 0x40c2be
cmp eax, 0x800
jae 0x40c2b3
push 2
pop ecx
jmp 0x40c2be
cmp eax, 0x10000
push 4
pop ecx
sbb ecx, 0
lea eax, [esp + 0x44]
add ecx, ebp
mov dword [eax], ebp
mov dword [eax + 4], ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], fcn.0040a891
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 0x40be50
mov dword [esp + 0x2c], eax
mov eax, esp
mov dword [esp + 0x30], 0x40afd4
lea ecx, [esp + 8]
mov dword [esp + 0x34], eax
mov eax, fcn.0040a601
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x40], eax
mov dword [ecx], str.byte_index__is_not_a_char_boundary__it_is_inside___bytes___of__
push 5
pop eax
mov dword [ecx + 4], eax
and dword [ecx + 0x10], 0
mov edx, esi
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], eax
call fcn.00429e70
push edi
push esi
mov esi, dword [esp + 0xc]
cmp edx, esi
jbe 0x40c365
mov eax, ecx
mov ecx, esi
xor edx, edx
sub ecx, 3
cmovb ecx, edx
lea edx, [esi + 1]
cmp ecx, edx
ja 0x40c36a
add edx, eax
add esi, eax
sub edx, eax
sub edx, ecx
test edx, edx
je 0x40c363
dec edx
cmp byte [esi], 0xc0
lea esi, [esi - 1]
jl 0x40c356
add edx, ecx
mov eax, edx
pop esi
pop edi
ret
push 0x42e8a0
call fcn.0042a04a