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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
lea eax, [esp + 0x60]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 1
mov dword [esp + 0x50], ecx
mov dword [esp + 0x20], 0
push 2
push 0x579c45
push dword [ebp + 8]
mov dword [esp + 0x50], edx
push edx
push eax
call fcn.004e15e0
add esp, 0x14
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0x70]
mov esi, dword [esp + 0x90]
mov edx, dword [esp + 0x6c]
cmp ecx, eax
mov edi, eax
mov dword [esp + 0x10], esi
cmova edi, ecx
test byte [esp + 0x60], 1
mov dword [esp + 0x5c], edi
mov edi, dword [esp + 0x94]
mov dword [esp + 4], edi
je 0x401cb2
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], 1
mov dword [esp], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x3c], edx
mov edx, eax
mov dword [esp + 0x4c], ebx
mov ebx, dword [esp + 0x7c]
sub edx, dword [esp + 0x3c]
mov dword [esp + 0x54], edx
lea edx, [ecx - 1]
cmp edx, eax
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x84]
lea eax, [eax - 1]
mov dword [esp + 0x40], eax
setb byte [esp + 0x37]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x98]
lea eax, [edx + ecx - 1]
mov dword [esp + 0x24], edx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x40]
cmp dword [esp + 8], 0xffffffff
lea eax, [ebx + eax]
je 0x401ab0
nop dword [eax + eax]
cmp eax, edi
jb 0x4019aa
jmp 0x401ee1
add ebx, dword [esp + 0x14]
mov dword [esp + 8], 0
mov eax, dword [esp + 0x40]
add eax, ebx
cmp eax, edi
jae 0x401ee1
movzx ecx, byte [esi + eax]
xor eax, eax
mov edx, 1
shld eax, edx, cl
shl edx, cl
test cl, 0x20
mov ecx, 0
cmovne eax, edx
cmovne edx, ecx
and eax, dword [esp + 0x30]
and edx, dword [esp + 0x4c]
or edx, eax
je 0x401990
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 8]
lea edx, [esi + ebx]
cmp ecx, eax
cmova eax, ecx
mov ecx, dword [esp + 0x14]
mov esi, eax
mov dword [esp + 0x38], eax
cmp eax, ecx
cmova ecx, eax
nop word cs:[eax + eax]
nop dword [eax]
cmp ecx, esi
je 0x401a50
mov eax, ebx
lea edi, [ebx + esi]
mov ebx, dword [esp + 4]
cmp edi, ebx
jae 0x401f6c
mov ebx, dword [esp + 0x24]
lea edi, [esi + 1]
movzx ebx, byte [ebx + esi]
cmp bl, byte [edx + esi]
mov esi, edi
mov ebx, eax
je 0x401a00
sub ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x10]
mov dword [esp + 8], 0
add ebx, edi
mov edi, dword [esp + 4]
jmp 0x40199c
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 4]
mov esi, dword [esp + 0x10]
nop dword [eax]
cmp dword [esp + 8], eax
jae 0x401aa0
dec eax
cmp eax, dword [esp + 0x14]
jae 0x401fa6
lea ecx, [eax + ebx]
cmp ecx, edi
jae 0x401f9a
mov edx, dword [esp + 0x24]
movzx edx, byte [edx + eax]
cmp dl, byte [esi + ecx]
je 0x401a60
mov eax, dword [esp + 0x54]
add ebx, dword [esp + 0x3c]
mov dword [esp + 8], eax
jmp 0x40199c
mov dword [esp + 8], 0
jmp 0x401ba8
cmp eax, edi
jb 0x401ad2
jmp 0x401ee1
add ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x40]
add eax, ebx
cmp eax, edi
jae 0x401ee1
movzx ecx, byte [esi + eax]
xor eax, eax
mov edx, 1
shld eax, edx, cl
shl edx, cl
test cl, 0x20
mov ecx, 0
cmovne eax, edx
cmovne edx, ecx
and eax, dword [esp + 0x30]
and edx, dword [esp + 0x4c]
or edx, eax
je 0x401ac0
mov edx, dword [esp + 0x2c]
mov eax, ebx
lea ecx, [esi + ebx]
mov edi, ebx
neg eax
nop dword [eax]
cmp dword [esp + 0x5c], edx
je 0x401b50
lea esi, [ebx + edx]
cmp esi, dword [esp + 4]
jae 0x401f81
mov esi, dword [esp + 0x24]
dec eax
movzx ebx, byte [esi + edx]
mov esi, dword [esp + 0x10]
cmp bl, byte [ecx + edx]
lea edx, [edx + 1]
mov ebx, edi
je 0x401b10
mov edi, dword [esp + 4]
neg eax
mov ebx, eax
jmp 0x401ac4
cmp byte [esp + 0x37], 0
je 0x401c8d
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x2c]
add eax, ebx
nop dword [eax]
sub edx, 1
jb 0x401ba0
cmp eax, dword [esp + 4]
jae 0x401fb5
movzx ebx, byte [ecx]
dec ecx
cmp bl, byte [esi + eax]
lea eax, [eax - 1]
mov ebx, edi
je 0x401b70
add ebx, dword [esp + 0x3c]
mov edi, dword [esp + 4]
jmp 0x401ac4
mov dword [esp + 8], 0xffffffff
mov esi, dword [esp + 0x18]
mov edi, ebx
mov dword [esp + 0x38], ebx
sub edi, dword [esp + 0x28]
mov eax, esi
sub eax, dword [esp]
cmp eax, edi
jb 0x401c39
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp]
mov eax, dword [esp + 0xc]
add ecx, dword [esp + 0x44]
add eax, ebx
push edi
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, edi
sub esi, ebx
mov eax, ebx
mov dword [esp + 0x20], ebx
cmp esi, dword [ebp + 0x10]
jb 0x401c67
mov edi, dword [esp + 0x38]
mov ebx, eax
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
add edi, dword [esp + 0x14]
add eax, ebx
push ecx
push dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, dword [ebp + 0x10]
mov dword [esp + 0x28], edi
mov dword [esp], ebx
mov dword [esp + 0x20], ebx
mov ebx, edi
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x40]
cmp dword [esp + 8], 0xffffffff
lea eax, [ebx + eax]
jne 0x401980
jmp 0x401ab0
push 1
push 1
push edi
push dword [esp + 0xc]
lea eax, [esp + 0x28]
push eax
call fcn.00408d80
add esp, 0x14
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 0xc], ecx
jmp 0x401bbf
push 1
push 1
push dword [ebp + 0x10]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00408d80
add esp, 0x14
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
jmp 0x401bea
cmp dword [esp + 0x2c], 0
mov dword [esp + 8], 0xffffffff
je 0x401ba8
push 0x5010fc
push dword [esp + 0x18]
push dword [esp + 0x50]
call fcn.004dac50
test edx, 0x10000
jne 0x401ee7
mov eax, dword [esp + 0x64]
and dl, 1
xor esi, esi
mov dword [esp], 0
mov dword [esp + 0xc], 1
jmp 0x401d0d
mov esi, eax
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 4]
mov ebx, dword [ebp + 0x10]
add eax, esi
push ebx
push dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x24]
add esi, ebx
xor edx, edx
mov dword [esp], esi
mov dword [esp + 0x20], esi
mov esi, eax
test eax, eax
je 0x401d36
cmp eax, edi
jae 0x401d30
mov ecx, eax
mov eax, dword [esp + 0x10]
cmp byte [eax + ecx], 0xc0
mov eax, ecx
jge 0x401d36
jmp 0x401fc6
jne 0x401fc4
cmp eax, edi
jne 0x401d50
test dl, 1
mov ebx, edi
jne 0x401e50
jmp 0x401ef8
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], eax
movzx ecx, byte [ebx + eax]
test cl, cl
js 0x401d77
mov edx, ecx
mov eax, dword [esp + 0x30]
test al, 1
je 0x401de8
mov ebx, dword [esp + 0x24]
jmp 0x401e50
movzx edi, byte [ebx + eax + 1]
mov edx, ecx
and edx, 0x1f
and edi, 0x3f
cmp cl, 0xe0
jb 0x401dd2
mov dword [esp + 0x14], edi
movzx edi, byte [ebx + eax + 2]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x14]
and dword [esp + 8], 0x3f
shl edi, 6
add dword [esp + 8], edi
cmp cl, 0xf0
mov edi, dword [esp + 8]
jb 0x401dd7
movzx ecx, byte [ebx + eax + 3]
shl edi, 6
and edx, 7
shl edx, 0x12
and ecx, 0x3f
or ecx, edi
mov edi, dword [esp + 4]
or edx, ecx
mov eax, dword [esp + 0x30]
test al, 1
jne 0x401d6e
jmp 0x401de8
shl edx, 6
jmp 0x401dda
shl edx, 0xc
or edx, edi
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x30]
test al, 1
jne 0x401d6e
mov ecx, 1
cmp edx, 0x80
jb 0x401e10
mov ecx, 2
cmp edx, 0x800
jb 0x401e10
cmp edx, 0x10000
mov ecx, 4
sbb ecx, 0
add ecx, dword [esp + 0x24]
je 0x401e2f
cmp ecx, edi
jae 0x401e29
mov eax, dword [esp + 0x10]
cmp byte [eax + ecx], 0xbf
jg 0x401e2f
jmp 0x401fc6
jne 0x401fc6
cmp ecx, edi
mov ebx, edi
je 0x401e50
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + ecx]
test al, al
js 0x401e45
mov ebx, ecx
jmp 0x401e50
cmp al, 0xe0
mov ebx, ecx
nop dword [eax]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], ebx
sub ebx, esi
mov eax, edi
sub eax, dword [esp]
cmp eax, ebx
jb 0x401eb6
add esi, dword [esp + 0x44]
mov eax, dword [esp + 0xc]
mov ecx, esi
mov esi, dword [esp]
add eax, esi
push ebx
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, ebx
sub edi, esi
mov eax, esi
mov dword [esp + 0x20], esi
cmp edi, dword [ebp + 0x10]
jae 0x401ce0
push 1
push 1
push dword [ebp + 0x10]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00408d80
add esp, 0x14
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
jmp 0x401ce0
push 1
push 1
push ebx
push dword [esp + 0xc]
lea eax, [esp + 0x28]
push eax
call fcn.00408d80
add esp, 0x14
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 0xc], ecx
jmp 0x401e63
mov esi, dword [esp + 0x28]
jmp 0x401ef8
xor esi, esi
mov dword [esp], 0
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 8]
mov edi, esi
sub eax, dword [esp]
sub ecx, esi
mov esi, ecx
cmp eax, ecx
jb 0x401f45
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0xc]
add eax, edi
mov edi, dword [esp]
add ecx, edi
push esi
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
add edi, esi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x20], edi
movsd xmm0, qword [esp + 0x18]
mov dword [eax + 8], edi
movsd qword [eax], xmm0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x18]
push 1
push 1
push esi
push dword [esp + 0xc]
push eax
call fcn.00408d80
add esp, 0x14
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0xc], eax
mov dword [esp], ecx
jmp 0x401f0c
add eax, dword [esp + 0x38]
cmp ebx, eax
cmova eax, ebx
push 0x50111c
push ebx
push eax
call fcn.004dac50
add edi, dword [esp + 0x2c]
mov eax, dword [esp + 4]
cmp eax, edi
cmova edi, eax
push 0x50111c
push eax
push edi
call fcn.004dac50
push 0x50110c
push edi
push ecx
call fcn.004dac50
push 0x5010fc
push dword [esp + 0x18]
push eax
call fcn.004dac50
push 0x50110c
push dword [esp + 8]
push eax
call fcn.004dac50
mov ecx, eax
push 0x50118c
mov eax, dword [esp + 8]
push eax
push ecx
push eax
push dword [esp + 0x20]
call fcn.004e2290
nop dword [eax + eax]
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call fcn.004dfa80
add esp, 0xc
pop ebp
ret