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, 0xb0
lea eax, [esp + 0x68]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 1
mov dword [esp + 0x54], ecx
mov dword [esp + 0x20], 0
push 2
push 0x535445
push dword [ebp + 8]
mov dword [esp + 0x50], edx
push edx
push eax
call fcn.004e2a30
add esp, 0x14
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0x78]
mov esi, dword [esp + 0x98]
mov edx, dword [esp + 0x74]
cmp ecx, eax
mov edi, eax
mov dword [esp + 0x34], esi
cmova edi, ecx
cmp dword [esp + 0x68], 0
mov dword [esp + 0x64], edi
mov edi, dword [esp + 0x9c]
mov dword [esp + 8], edi
je 0x401cd2
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x30], eax
mov dword [esp + 0xc], 1
mov dword [esp + 4], 0
mov dword [esp + 0x2c], edx
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x40], esi
mov esi, ecx
mov ecx, eax
sub ecx, dword [esp + 0x40]
mov dword [esp + 0x28], esi
mov dword [esp + 0x58], ecx
lea ecx, [esi - 1]
cmp ecx, eax
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x8c]
lea eax, [eax - 1]
setb byte [esp + 0x3b]
mov dword [esp + 0x48], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xa0]
lea eax, [ecx + esi - 1]
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov dword [esp + 0x5c], eax
nop dword [eax]
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], ecx
lea eax, [ebx + eax]
je 0x401ad0
mov esi, dword [esp + 0x34]
cmp eax, edi
jb 0x4019ba
jmp 0x401cf2
add ebx, dword [esp + 0x30]
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x48]
add eax, ebx
cmp eax, edi
jae 0x401cf2
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 + 0x2c]
and edx, dword [esp + 0x50]
or edx, eax
je 0x4019a0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov eax, esi
cmp ecx, edx
mov esi, edx
lea edx, [eax + ebx]
cmova esi, ecx
mov ecx, dword [esp + 0x30]
mov eax, esi
mov dword [esp + 0x3c], esi
cmp esi, ecx
cmova ecx, esi
nop word [eax + eax]
cmp ecx, eax
je 0x401a60
mov esi, ebx
lea edi, [ebx + eax]
mov ebx, dword [esp + 8]
cmp edi, ebx
jae 0x401f85
mov ebx, dword [esp + 0x24]
lea edi, [eax + 1]
movzx ebx, byte [ebx + eax]
cmp bl, byte [edx + eax]
mov eax, edi
mov ebx, esi
je 0x401a10
sub ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x14], 0
add ebx, edi
mov edi, dword [esp + 8]
jmp 0x4019ac
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x34]
nop dword [eax]
cmp dword [esp + 0x14], eax
jae 0x401ab0
dec eax
cmp eax, dword [esp + 0x30]
jae 0x401fbf
lea ecx, [eax + ebx]
cmp ecx, edi
jae 0x401fb3
mov edx, dword [esp + 0x24]
movzx edx, byte [edx + eax]
cmp dl, byte [esi + ecx]
je 0x401a70
mov eax, dword [esp + 0x58]
add ebx, dword [esp + 0x40]
mov dword [esp + 0x14], eax
jmp 0x4019ac
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], 0
jmp 0x401bcc
mov esi, dword [esp + 0x34]
cmp eax, edi
jb 0x401af2
jmp 0x401cf2
add ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x48]
add eax, ebx
cmp eax, edi
jae 0x401cf2
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 + 0x2c]
and edx, dword [esp + 0x50]
or edx, eax
je 0x401ae0
mov edx, dword [esp + 0x28]
mov eax, ebx
lea ecx, [esi + ebx]
mov edi, ebx
neg eax
nop dword [eax]
cmp dword [esp + 0x64], edx
je 0x401b70
lea esi, [ebx + edx]
cmp esi, dword [esp + 8]
jae 0x401f9a
mov esi, dword [esp + 0x24]
dec eax
movzx ebx, byte [esi + edx]
mov esi, dword [esp + 0x34]
cmp bl, byte [ecx + edx]
mov ebx, edi
lea edx, [edx + 1]
je 0x401b30
mov edi, dword [esp + 8]
neg eax
mov ebx, eax
jmp 0x401ae4
test byte [esp + 0x3b], 1
je 0x401ca9
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x28]
add eax, ebx
nop dword [eax]
sub edx, 1
jb 0x401bc0
cmp eax, dword [esp + 8]
jae 0x401fce
movzx ebx, byte [ecx]
dec ecx
cmp bl, byte [esi + eax]
lea eax, [eax - 1]
mov ebx, edi
je 0x401b90
add ebx, dword [esp + 0x40]
mov edi, dword [esp + 8]
jmp 0x401ae4
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], 0xffffffff
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x3c], esi
sub esi, dword [esp + 4]
add ecx, eax
lea edx, [eax + ebx]
sub edx, ecx
cmp esi, edx
jb 0x401c4c
mov esi, dword [esp + 4]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x60], edx
add eax, esi
push edx
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x3c]
sub ecx, esi
mov eax, esi
mov dword [esp + 0x20], esi
cmp ecx, dword [ebp + 0x10]
jb 0x401c87
add ebx, dword [esp + 0x30]
mov ecx, dword [ebp + 0x10]
mov esi, eax
mov eax, dword [esp + 0xc]
mov edi, ebx
mov ebx, ecx
add eax, esi
push ecx
push dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, ebx
mov ebx, edi
mov ecx, edi
mov edi, dword [esp + 8]
mov dword [esp + 4], esi
mov dword [esp + 0x20], esi
jmp 0x401970
push edx
push dword [esp + 8]
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x1c], ecx
mov esi, edx
call fcn.00405fa0
mov ecx, dword [esp + 0x1c]
mov edx, esi
add esp, 0xc
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0xc], esi
jmp 0x401be7
push dword [ebp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00405fa0
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
jmp 0x401c15
cmp dword [esp + 0x28], 0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], 0xffffffff
je 0x401bcc
push 0x5020fc
push dword [esp + 0x34]
push dword [esp + 0x54]
call fcn.004dc480
test edx, 0xff0000
je 0x401d4b
mov dword [esp + 4], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x44]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
sub eax, dword [esp + 4]
add esi, edx
add ecx, edx
sub ecx, esi
mov edx, esi
mov esi, ecx
cmp eax, ecx
jb 0x401f5a
mov edi, dword [esp + 4]
mov eax, dword [esp + 0xc]
add eax, edi
push esi
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add edi, esi
mov eax, dword [esp + 0x54]
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
mov ebx, dword [esp + 0x6c]
mov dword [esp + 4], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
jmp 0x401dac
mov ebx, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 8]
mov ecx, dword [ebp + 0x10]
xor bl, 1
add eax, esi
push ecx
push dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_memcpy
mov edx, ebx
add esp, 0xc
add esi, dword [ebp + 0x10]
mov ebx, dword [esp + 0x24]
mov dword [esp + 4], esi
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x34]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x401dc6
cmp ebx, edi
jae 0x401dc0
cmp byte [esi + ebx], 0xc0
jge 0x401dc6
jmp 0x401fdd
jne 0x401fdd
cmp ebx, edi
jne 0x401de0
test dl, dl
mov ebx, edi
jne 0x401ec0
jmp 0x401cf2
movzx eax, byte [esi + ebx]
test al, al
jns 0x401e50
movzx edi, byte [esi + ebx + 1]
mov ecx, eax
and ecx, 0x1f
and edi, 0x3f
cmp al, 0xe0
jb 0x401e41
mov dword [esp + 0x2c], edx
movzx edx, byte [esi + ebx + 2]
shl edi, 6
mov dword [esp + 0x24], ebx
and edx, 0x3f
or edx, edi
cmp al, 0xf0
jb 0x401ea8
mov ebx, dword [esp + 0x24]
shl edx, 6
mov edi, dword [esp + 8]
and ecx, 7
shl ecx, 0x12
movzx eax, byte [esi + ebx + 3]
and eax, 0x3f
or eax, edx
mov edx, dword [esp + 0x2c]
or eax, ecx
test dl, dl
jne 0x401ec0
jmp 0x401e54
shl ecx, 6
or ecx, edi
mov edi, dword [esp + 8]
mov eax, ecx
nop dword [eax]
test dl, dl
jne 0x401ec0
mov ecx, 1
cmp eax, 0x80
jb 0x401e79
mov ecx, 2
cmp eax, 0x800
jb 0x401e79
cmp eax, 0x10000
mov ecx, 4
sbb ecx, 0
add ebx, ecx
je 0x401e92
cmp ebx, edi
jae 0x401e8c
cmp byte [esi + ebx], 0xc0
jge 0x401e92
jmp 0x401fdd
jne 0x401fdd
mov dl, 1
cmp ebx, edi
jne 0x401e9c
mov ebx, edi
jmp 0x401ec0
movzx eax, byte [esi + ebx]
test al, al
jns 0x401ec0
cmp al, 0xe0
jmp 0x401ec0
shl ecx, 0xc
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x24]
or edx, ecx
mov eax, edx
mov edx, dword [esp + 0x2c]
test dl, dl
je 0x401e54
nop
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x24], ebx
mov edx, edi
add ecx, eax
add ebx, eax
sub edx, dword [esp + 4]
sub ebx, ecx
cmp edx, ebx
jb 0x401f2e
mov esi, dword [esp + 4]
mov eax, dword [esp + 0xc]
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 0x401d70
push dword [ebp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00405fa0
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
jmp 0x401d70
push ebx
push dword [esp + 8]
lea eax, [esp + 0x20]
push eax
mov esi, ecx
call fcn.00405fa0
mov ecx, esi
add esp, 0xc
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
jmp 0x401ee4
lea eax, [esp + 0x18]
push esi
push dword [esp + 8]
push eax
mov edi, edx
call fcn.00405fa0
mov edx, edi
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
jmp 0x401d17
add esi, dword [esp + 0x3c]
cmp ebx, esi
cmova esi, ebx
push 0x50211c
push ebx
push esi
call fcn.004dc480
add ebx, dword [esp + 0x28]
mov eax, dword [esp + 8]
cmp eax, ebx
cmova ebx, eax
push 0x50211c
push eax
push ebx
call fcn.004dc480
push 0x50210c
push edi
push ecx
call fcn.004dc480
push 0x5020fc
push dword [esp + 0x34]
push eax
call fcn.004dc480
push 0x50210c
push dword [esp + 0xc]
push eax
call fcn.004dc480
push 0x50218c
mov eax, dword [esp + 0xc]
push eax
push ebx
push eax
push dword [esp + 0x44]
call fcn.004e3690
nop word cs:[eax + eax]
nop dword [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.004e0fc0
add esp, 0xc
pop ebp
ret