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

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x68]
push ebp
push esi
push edi
push 0
push ebx
call fcn.00401660
add esp, 8
test eax, eax
jne 0x401da7
pop edi
pop esi
pop ebp
mov eax, 0xc
pop ebx
add esp, 0x54
ret
lea eax, [esp + 0x58]
push 0
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x54]
push ecx
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
call section..text
mov edi, dword [esp + 0x88]
push ebx
push edi
call fcn.00401540
add esp, 0x20
test eax, eax
jge 0x401e1f
mov eax, dword [esp + 0x68]
test eax, eax
je 0x401df9
push 0
push eax
call fcn.004011a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x401e15
push edi
push eax
call fcn.00401130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
lea edx, [esp + 0x28]
push edi
push edx
call fcn.00401130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea eax, [esp + 0x34]
push ebx
push eax
call fcn.00401130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
mov ecx, dword [edi + 4]
lea edx, [esp + 0x4c]
add ecx, 2
mov eax, 1
push ecx
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], eax
call fcn.00401090
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
push eax
lea eax, [esp + 0x50]
push eax
call fcn.004011a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea ecx, [esp + 0x40]
push 2
push ecx
call fcn.00401090
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea edx, [esp + 0x58]
push 3
push edx
call fcn.00401090
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea eax, [esp + 0x34]
push eax
call fcn.00401200
add esp, 4
and eax, 0x8000001f
jns 0x401edd
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x401f1f
mov edi, 0x1f
lea ecx, [esp + 0x28]
sub edi, eax
push edi
push ecx
mov dword [esp + 0x28], edi
call fcn.00401390
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea edx, [esp + 0x34]
push edi
push edx
call fcn.00401390
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
jmp 0x401f27
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x34]
lea edi, [eax - 1]
lea eax, [ecx - 1]
mov ebx, edi
mov dword [esp + 0x14], eax
sub ebx, eax
mov ebp, ebx
shl ebp, 5
push ebp
push edx
call fcn.00401390
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.004015c0
add esp, 0x10
test eax, eax
jl 0x401f98
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x34]
push edx
mov ecx, dword [eax + ebx*4]
inc ecx
mov dword [eax + ebx*4], ecx
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.00401920
lea edx, [esp + 0x40]
lea eax, [esp + 0x34]
push edx
push eax
call fcn.004015c0
add esp, 0x14
test eax, eax
jge 0x401f63
lea ecx, [esp + 0x34]
push ebp
push ecx
call fcn.00401480
mov eax, dword [esp + 0x1c]
add esp, 8
cmp edi, eax
mov dword [esp + 0x10], edi
jle 0x402267
lea eax, [ebx - 1]
lea ebx, [eax*4]
shl eax, 5
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + edx*4]
mov edx, dword [esp + 0x14]
mov edi, dword [eax + edx*4]
cmp ecx, edi
jb 0x401ff6
mov eax, dword [esp + 0x54]
mov dword [ebx + eax], 0xffffffff
jmp 0x402092
mov esi, edi
mov eax, ecx
shr esi, 0x10
xor edx, edx
mov ebx, edi
div esi
xor edx, edx
and ebx, 0xffff
mov dword [esp + 0x24], eax
imul eax, esi
sub ecx, eax
mov eax, dword [esp + 0x10]
shl ecx, 0x10
mov dx, word [ebp + eax*4 - 2]
mov ebp, dword [esp + 0x24]
mov eax, ebp
or ecx, edx
imul eax, ebx
cmp ecx, eax
jae 0x402041
add ecx, edi
dec ebp
cmp ecx, edi
jb 0x402041
cmp ecx, eax
jae 0x402041
add ecx, edi
dec ebp
cmp ecx, edi
jae 0x402036
sub ecx, eax
xor edx, edx
mov eax, ecx
div esi
mov edx, eax
imul edx, esi
mov esi, dword [esp + 0x10]
sub ecx, edx
mov edx, dword [esp + 0x30]
shl ecx, 0x10
mov edx, dword [edx + esi*4 - 4]
and edx, 0xffff
or ecx, edx
mov edx, eax
imul edx, ebx
cmp ecx, edx
jae 0x402082
add ecx, edi
dec eax
cmp ecx, edi
jb 0x402082
cmp ecx, edx
jae 0x402082
add ecx, edi
dec eax
cmp ecx, edi
jae 0x402077
mov ebx, dword [esp + 0x1c]
shl ebp, 0x10
or ebp, eax
mov eax, dword [esp + 0x54]
mov dword [ebx + eax], ebp
mov eax, dword [esp + 0x54]
inc dword [ebx + eax]
mov eax, dword [esp + 0x54]
lea ecx, [esp + 0x40]
push 0
push ecx
dec dword [ebx + eax]
call fcn.004011a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
mov ecx, dword [esp + 0x14]
cmp ecx, 1
jl 0x4020ca
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x48]
mov dword [edx], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
mov ecx, dword [eax + ecx*4]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x40]
mov ecx, dword [ebx + eax]
lea eax, [esp + 0x40]
push ecx
push edx
push eax
call fcn.00401d40
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4022ce
lea ecx, [esp + 0x58]
push eax
push ecx
call fcn.004011a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
mov eax, dword [esp + 0x10]
cmp eax, 2
jge 0x402127
xor ecx, ecx
jmp 0x40212f
mov edx, dword [esp + 0x30]
mov ecx, dword [edx + eax*4 - 8]
mov edx, dword [esp + 0x60]
cmp eax, 1
mov dword [edx], ecx
jge 0x40213e
xor ecx, ecx
jmp 0x402146
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x60]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x58]
mov dword [eax + 8], edx
lea edx, [esp + 0x40]
push ecx
push edx
call fcn.004015c0
add esp, 8
test eax, eax
jg 0x402099
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x34]
mov ecx, dword [ebx + eax]
lea eax, [esp + 0x40]
push ecx
push edx
push eax
call fcn.00401d40
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4022ce
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x40]
push edi
push ecx
call fcn.00401390
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea edx, [esp + 0x40]
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.00401920
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4022ce
lea edx, [esp + 0x28]
push eax
push edx
call fcn.00401660
add esp, 8
test eax, eax
jge 0x402244
lea eax, [esp + 0x34]
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.00401130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea edx, [esp + 0x40]
push edi
push edx
call fcn.00401390
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022ce
lea eax, [esp + 0x40]
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
call fcn.004018b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4022ce
mov eax, dword [esp + 0x54]
dec dword [ebx + eax]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
dec eax
sub edi, 0x20
sub ebx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
jg 0x401fcb
mov edi, dword [esp + 0x68]
test edi, edi
je 0x40228c
lea eax, [esp + 0x4c]
push eax
push edi
call fcn.00401130
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
add esp, 8
mov edx, dword [ecx]
imul edx, dword [eax]
mov dword [edi], edx
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x4022ce
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.00401480
lea eax, [esp + 0x30]
push eax
push edi
call fcn.00401130
mov ecx, dword [esp + 0x80]
push 0
push edi
mov edx, dword [ecx]
mov dword [edi], edx
call fcn.00401660
add esp, 0x18
test eax, eax
jne 0x4022ce
mov dword [edi], 1
lea eax, [esp + 0x58]
push 0
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x54]
push ecx
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.00401030
add esp, 0x18
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret