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

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x30], 0
call fcn.004055b0
test eax, eax
je case.0x401ad0.41
mov ebp, dword [esp + 0x58]
push ebp
call fcn.00462240
add esp, 4
test eax, eax
je case.0x401ad0.41
push 0x1000
call fcn.0041a6a0
add esp, 4
test eax, eax
jne case.0x401ad0.41
push ebp
call fcn.004621c0
push eax
call fcn.004621a0
add esp, 8
mov esi, eax
call fcn.004352f0
cmp esi, eax
jne case.0x401ad0.41
mov ebx, dword [esp + 0x54]
push ebx
call fcn.004390d0
add esp, 4
test eax, eax
jne case.0x401ad0.41
call fcn.00407b40
mov esi, eax
mov dword [esp + 0x20], esi
mov eax, dword [esi + 0x39e]
test eax, eax
je case.0x401ad0.41
push 0
push ebp
call fcn.00401060
mov ebp, eax
add esp, 8
test ebp, ebp
mov dword [esp + 0x38], ebp
je case.0x401ad0.41
xor eax, eax
mov ax, word [ebp + 0x2d]
push eax
call fcn.00461550
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x1c], edi
je case.0x401ad0.41
push esi
push ebp
call fcn.00401030
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je case.0x401ad0.41
call fcn.00435300
push eax
call fcn.0054da70
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
xor eax, eax
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov al, byte [ecx + 0x3cf]
cmp eax, 5
ja case.0x401ad0.41
mov ecx, 1
jmp dword [eax*4 + 0x4023f4]
mov eax, 0x65
mov dword [esp + 0x28], ecx
push eax
call fcn.00462980
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x34], edi
je case.0x401ad0.41
lea eax, [esi + esi*2]
lea edx, [eax + eax*8]
mov eax, dword [esp + 0x20]
shl edx, 1
sub edx, esi
lea esi, [edx + eax + 0x8150]
call fcn.00434a50
mov ecx, dword [esi + 0x29]
test ecx, ecx
jbe 0x401a30
cmp ecx, eax
jbe 0x401a1e
sub ecx, eax
mov dword [esi + 0x29], ecx
jmp 0x401a37
mov eax, 0x66
mov dword [esp + 0x2c], ecx
jmp 0x401981
mov eax, 0x67
jmp 0x401985
mov eax, 0x68
jmp 0x401981
mov eax, 0x65
jmp 0x4019ed
mov eax, 0x66
cmp word [edi + 0x8bb], 0
mov dword [esp + 0x2c], 8
je 0x401981
cmp byte [edi + 0x8b9], 0xa
jbe 0x401981
mov eax, 0x67
mov dword [esp + 0x2c], 0xc
jmp 0x401985
mov ecx, dword [esi + 0x2d]
mov dword [esi + 0x29], 0
or ecx, 1
mov dword [esi + 0x2d], ecx
jmp 0x401a37
mov dword [esi + 0x29], 0x9c40
mov ecx, dword [esi + 0x31]
test ecx, ecx
jbe 0x401a5b
cmp ecx, eax
jbe 0x401a49
sub ecx, eax
mov dword [esi + 0x31], ecx
jmp 0x401a62
mov ecx, dword [esi + 0x2d]
mov dword [esi + 0x31], 0
or ecx, 2
mov dword [esi + 0x2d], ecx
jmp 0x401a62
mov dword [esi + 0x31], 0x3a98
mov cx, word [esi + 3]
test cx, cx
jbe 0x401a85
mov edx, ecx
and edx, 0xffff
cmp edx, eax
jb 0x401a7f
sub ecx, eax
mov word [esi + 3], cx
jmp 0x401a85
mov word [esi + 3], 0
cmp word [esi + 1], 0
jbe 0x401b1b
call fcn.00434a50
mov cx, word [esi + 1]
mov edx, ecx
and edx, 0xffff
cmp edx, eax
jb 0x401aad
sub ecx, eax
mov word [esi + 1], cx
jmp 0x401ab3
mov word [esi + 1], 0
xor eax, eax
mov ax, word [ebx + 0xb2]
add eax, 0xffffffd8
cmp eax, 0x1e
ja case.0x401ad0.41
xor ecx, ecx
mov cl, byte [eax + 0x402414]
jmp dword [ecx*4 + 0x40240c]
mov eax, dword [esp + 0x18]
mov ecx, dword [ebx + 0x128]
mov edx, dword [eax + 0x128]
mov eax, dword [eax + 0x124]
push edx
mov edx, dword [ebx + 0x124]
push eax
push ecx
push edx
call fcn.0054e500
add esp, 0x10
cmp eax, 0x3c0
jb case.0x401ad0.41
mov word [esi + 1], 0
mov byte [esi], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
push ebx
call fcn.0043c300
add esp, 4
mov dword [esp + 0x3c], eax
test eax, eax
je 0x401b3f
test byte [eax], 2
jne case.0x401ad0.41
test byte [eax + 0x22], 1
jne case.0x401ad0.41
mov word [esi + 1], 0x1f4
mov ax, word [ebx + 0xb2]
cmp ax, 0x28
je case.0x401ad0.41
cmp ax, 0x2d
je case.0x401ad0.41
mov eax, dword [edi + 0x10]
push eax
call fcn.00401000
add esp, 4
test eax, eax
je 0x401bc1
mov ecx, dword [edi + 0x20]
mov eax, 0x51eb851f
imul ecx, dword [ebp + 0x19]
mul ecx
mov eax, dword [ebp + 0x15]
shr edx, 5
cmp eax, edx
ja 0x401bc1
mov eax, dword [edi + 0x14]
test eax, eax
je 0x401bc1
test byte [esi + 0x2d], 1
je 0x401bc1
mov edx, dword [ebx + 0x128]
mov eax, dword [ebx + 0x124]
push edx
push eax
push ebx
call fcn.0043a090
mov ecx, dword [edi + 0x14]
add esp, 4
push eax
push 1
push ecx
push ebx
call fcn.00457160
add esp, 0x18
cmp eax, 1
je 0x401c2c
mov edx, dword [edi + 8]
push edx
call fcn.00401000
add esp, 4
test eax, eax
je 0x401c49
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x401c49
test byte [esi + 0x2d], 1
je 0x401c49
mov eax, dword [ebp + 0xf]
test al, 0x3f
jne 0x401bee
test dword [ebp + 0x48], 0x7fff
je 0x401c49
push ecx
mov ecx, dword [ebp + 0x48]
push ecx
push eax
call fcn.0046c530
add esp, 0xc
test eax, eax
je 0x401c49
mov edx, dword [ebx + 0x128]
mov eax, dword [ebx + 0x124]
push edx
push eax
push ebx
call fcn.0043a090
mov ecx, dword [edi + 0xc]
add esp, 4
push eax
push 1
push ecx
push ebx
call fcn.00457160
add esp, 0x18
cmp eax, 1
jne 0x401c49
mov eax, dword [esi + 0x2d]
mov dword [esi + 0x29], 0
and al, 0xfe
mov word [esi + 1], 0xbb8
mov dword [esi + 0x2d], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
xor eax, eax
mov al, byte [esi]
dec eax
cmp eax, 4
ja case.0x401c57.2
jmp dword [eax*4 + 0x402434]
mov word [esi + 1], 0x7d0
jmp 0x401c74
mov word [esi + 1], 0xfa0
mov dword [esp + 0x24], 1
push ebx
call fcn.0043c300
mov ecx, dword [esp + 0x24]
mov edi, eax
lea edx, [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push eax
push ecx
push ebp
call fcn.00401110
add esp, 0x14
test eax, eax
jne 0x401cbe
call fcn.00435300
push eax
call fcn.0054da70
mov edx, dword [eax + 0x124]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
mov eax, dword [eax + 0x128]
add esp, 4
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x128]
push ecx
mov ecx, dword [ebx + 0x124]
push edx
push eax
push ecx
call fcn.0054e500
add esp, 0x10
cmp eax, 0x500
mov eax, dword [esp + 0x24]
jb 0x401d6d
test eax, eax
jne 0x401cf4
mov byte [esi], 3
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x128]
push edx
mov edx, dword [ebx + 0x124]
push eax
push ecx
push edx
call fcn.0054e0c0
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x58]
push ecx
push edx
push eax
push 0x5000000
call fcn.0054e3d0
mov ecx, dword [esp + 0x6c]
mov edx, dword [ebx + 0x128]
mov eax, dword [ebx + 0x124]
mov ebp, dword [esp + 0x68]
add ecx, edx
lea edx, [esp + 0x68]
add eax, ebp
push edx
xor edx, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov dl, byte [edi + 4]
push edx
push ecx
push eax
call fcn.00403250
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
add esp, 0x30
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x401d74
test eax, eax
jne 0x401d74
mov byte [esi], 4
mov al, byte [esi]
mov ebp, 0x6f0000
cmp al, 1
jne 0x401d84
mov ebp, 0x4f0000
push ebx
call fcn.00403170
mov edx, dword [esp + 0x14]
push 0x40
push edx
call fcn.00460850
add esp, 0xc
push eax
mov eax, dword [esp + 0x18]
push 0x40
push eax
call fcn.00460850
add esp, 8
push eax
call fcn.0046e290
add esp, 8
test ebp, eax
je 0x401e1d
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
sar ecx, 6
push ebp
push ecx
sar edx, 6
push edx
push ebx
call fcn.004036e0
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
je 0x401e1d
mov ecx, dword [esp + 0x42]
and eax, 0xffff
shl eax, 6
and ecx, 0xffff
mov ebp, eax
shl ecx, 6
xor edx, edx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ecx
mov dl, byte [edi + 4]
lea eax, [esp + 0x48]
push eax
push edx
push ebp
push ecx
call fcn.00403250
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
add esp, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
push ebx
call fcn.004031e0
mov eax, dword [ebx + 0x124]
mov ebp, dword [esp + 0x18]
sub eax, ebp
mov ecx, dword [esp + 0x14]
cdq
xor eax, edx
add esp, 4
sub eax, edx
cmp eax, 0x40
jge 0x401e6c
mov eax, dword [ebx + 0x128]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x40
jge 0x401e6c
mov eax, dword [esp + 0x24]
mov byte [esi], 0
test eax, eax
jne case.0x401ad0.41
mov word [esi + 1], 0x5dc
jmp 0x401fe9
cmp word [esi + 3], 0
jne 0x401e8f
push ecx
push ebp
push ebx
call fcn.00456f30
mov eax, 0x1f4
add esp, 0xc
cmp word [esi + 1], ax
mov word [esi + 3], ax
jae 0x401e9e
jmp 0x401e9a
mov eax, 0x1f4
cmp word [esi + 1], ax
jbe 0x401e9e
mov word [esi + 1], ax
mov eax, dword [esp + 0x24]
test eax, eax
jne case.0x401ad0.41
mov eax, dword [esp + 0x28]
test eax, eax
je 0x401ebf
call fcn.00401210
test eax, eax
jne 0x401fe9
mov eax, dword [esp + 0x18]
mov ecx, dword [ebx + 0x128]
mov edx, dword [eax + 0x128]
mov eax, dword [eax + 0x124]
push edx
mov edx, dword [ebx + 0x124]
push eax
push ecx
push edx
call fcn.0054e500
mov ecx, dword [esp + 0x44]
add esp, 0x10
mov edx, dword [ecx + 0x40]
shl edx, 6
cmp eax, edx
jbe 0x401fe9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x128]
mov edx, dword [eax + 0x124]
mov eax, dword [ebx + 0x128]
push ecx
mov ecx, dword [ebx + 0x124]
push edx
push eax
push ecx
call fcn.0054e500
add esp, 0x10
cmp eax, 0x3c0
jae 0x4021fe
mov edx, dword [edi + 0x40]
shl edx, 6
cmp eax, edx
jb 0x401f52
mov eax, dword [edi + 0x3c]
push eax
call fcn.00401000
add esp, 4
test eax, eax
jne 0x4021fe
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
push eax
push ebp
call fcn.00401110
add esp, 0x10
test eax, eax
jne 0x401f86
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x124]
mov dword [esp + 0x14], ecx
mov edx, dword [eax + 0x128]
mov dword [esp + 0x10], edx
mov ecx, dword [edi + 0x20]
mov eax, 0x51eb851f
imul ecx, dword [ebp + 0x19]
mul ecx
mov eax, dword [ebp + 0x15]
shr edx, 5
cmp eax, edx
ja 0x401fe9
mov edx, dword [edi + 0x1c]
push edx
call fcn.00401000
add esp, 4
test eax, eax
je 0x401fe9
mov eax, dword [ebx + 0x124]
mov ecx, dword [esp + 0x14]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x80
jge 0x401fde
mov eax, dword [ebx + 0x128]
mov ecx, dword [esp + 0x10]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x80
jl 0x401fe9
mov byte [esi], 5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esi + 9]
test eax, eax
je 0x401ffa
mov dword [esi + 5], eax
mov dword [esi + 9], 0
mov eax, dword [esp + 0x1c]
mov bp, word [eax + 0x8bb]
test bp, bp
je 0x402071
test byte [esi + 0x2d], 2
je 0x402071
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
and ebp, 0xffff
push edx
xor ebx, ebx
mov bl, byte [ecx + 0x8ba]
push eax
push ebp
call fcn.00401430
mov edi, eax
add esp, 0xc
test edi, edi
je 0x40206d
mov eax, dword [esi + 0x2d]
push edi
and al, 0xfd
mov dword [esi + 0x31], 0
mov dword [esi + 0x2d], eax
call fcn.0043a090
mov dword [esp + 0x30], eax
mov eax, dword [esi + 9]
add esp, 4
test eax, eax
jne 0x402330
mov ecx, dword [esi + 5]
mov dword [esi + 9], ecx
jmp 0x402330
mov ebx, dword [esp + 0x54]
push ebx
call fcn.0043c300
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
push edx
push 0
push ebp
push esi
push eax
call fcn.00401230
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x402209
mov ecx, dword [ebp + 0x2c]
push ecx
call fcn.00401000
add esp, 4
test eax, eax
je 0x4021f1
call fcn.00435480
push eax
call fcn.0054da70
mov edi, eax
add esp, 4
test edi, edi
je 0x4021f1
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
mov edx, dword [esp + 0x3c]
push eax
push ecx
push edx
call fcn.00401110
add esp, 0x10
test eax, eax
jne 0x4020ff
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x124]
mov dword [esp + 0x14], ecx
mov edx, dword [eax + 0x128]
mov dword [esp + 0x10], edx
test dword [edi + 0xe0], 0x8000000
jne 0x4021d9
push edi
call fcn.0043c300
mov ebx, eax
add esp, 4
mov ebp, dword [ebx + 8]
call fcn.004352f0
cmp ebp, eax
je 0x4021d9
push 0
push ebp
call fcn.00401060
add esp, 8
test eax, eax
jne 0x4021d9
test dword [ebx], 0x8000000
jne 0x4021d9
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
xor eax, eax
push edx
mov al, byte [ecx + 0x89c]
mov ecx, dword [edi + 0x128]
mov edx, dword [edi + 0x124]
mov ebp, eax
mov eax, dword [esp + 0x18]
push eax
push ecx
push edx
shl ebp, 6
call fcn.0054e500
add esp, 0x10
cmp eax, ebp
jbe 0x4021ae
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4021d9
mov ecx, dword [eax + 0x128]
mov edx, dword [eax + 0x124]
mov eax, dword [edi + 0x128]
push ecx
mov ecx, dword [edi + 0x124]
push edx
push eax
push ecx
call fcn.0054e500
add esp, 0x10
cmp eax, ebp
ja 0x4021d9
mov eax, dword [esp + 0x20]
mov edx, dword [0x604ec8]
push edx
mov ecx, dword [eax + 0x6958]
add eax, 0x32c
push ecx
push 0
push ebx
push eax
call fcn.00460a50
add esp, 0x14
test eax, eax
jne 0x40226b
call fcn.004354d0
push eax
call fcn.0054da70
mov edi, eax
add esp, 4
test edi, edi
jne 0x4020ff
mov dword [esi + 5], 0
mov word [esi + 1], 0x5dc
mov byte [esi], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
test dword [edi + 0xe0], 0x8000000
jne 0x4021f1
mov edx, dword [esp + 0x1c]
cmp word [edx + 0x8bb], 0
jne 0x402273
push ebx
mov ebp, 0x14
call fcn.0043c300
mov al, byte [eax + 6]
add esp, 4
cmp al, 0x32
ja 0x40223f
mov ebp, 0x5a
jmp 0x40225e
cmp al, 0x3c
ja 0x40224a
mov ebp, 0x50
jmp 0x40225e
cmp al, 0x4b
ja 0x402255
mov ebp, 0x32
jmp 0x40225e
cmp al, 0x5a
ja 0x40225e
mov ebp, 0x1e
push ebp
call fcn.00401000
add esp, 4
test eax, eax
je 0x402273
mov dword [esp + 0x30], 1
push edi
call fcn.0043a090
mov ebx, eax
push edi
mov dword [esp + 0x34], ebx
call fcn.0043c300
add esp, 8
test ebx, ebx
je 0x4021f1
test dword [eax], 0x4000000
jne 0x4021f1
mov al, byte [esi + 0x2d]
mov dword [esi + 5], ebx
test al, 1
mov word [esi + 1], 0xfa0
mov byte [esi], 2
je 0x40239d
push 0x64
push 0
call fcn.0046d4f0
cdq
mov ecx, 3
add esp, 8
idiv ecx
mov ecx, dword [esp + 0x1c]
xor eax, eax
cmp word [ecx + edx*4 + 0x87e], 0
jne 0x4022e6
inc edx
cmp edx, 3
jl 0x4022e0
xor edx, edx
inc eax
cmp eax, 3
jl 0x4022cd
mov eax, dword [esp + 0x1c]
xor ebp, ebp
xor ebx, ebx
mov bp, word [eax + edx*4 + 0x87e]
mov bx, word [eax + edx*4 + 0x880]
test ebp, ebp
je 0x40239d
mov eax, dword [esp + 0x30]
test eax, eax
je 0x402321
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push esi
push edx
push eax
call fcn.00401600
add esp, 0xc
mov eax, dword [esi + 0x2d]
mov dword [esi + 0x29], 0
and al, 0xfe
mov dword [esi + 0x2d], eax
push ebp
call fcn.0046c0a0
add esp, 4
mov dword [esp + 0x38], eax
test eax, eax
je 0x40239d
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x3c]
push ecx
push edx
call fcn.00401850
mov ecx, dword [esp + 0x40]
and eax, 0xffff
add esp, 8
add eax, dword [ecx + 0x30]
cmp eax, 0x1f4
jge 0x40236b
mov eax, 0x1f4
mov ecx, dword [esp + 0x2c]
add eax, 0x64
mov word [esi + 1], ax
mov edx, dword [edi + 0x128]
mov eax, dword [edi + 0x124]
push esi
push ebx
push ebp
push edx
mov edx, dword [esp + 0x64]
push eax
push ecx
push edx
call fcn.0043ee90
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
push eax
push ecx
call fcn.00401850
add esp, 8
and eax, 0xffff
je 0x4023bd
add eax, 0x64
mov word [esi + 1], ax
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x54]
push esi
push edx
push edi
call fcn.0043ee50
mov eax, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
je case.0x401ad0.41
mov eax, dword [esp + 0x58]
push esi
push eax
push edi
call fcn.00401600
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret