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

Disassembly:
sub esp, 0x68
push ebx
push esi
push edi
mov edi, dword [esp + 0x7c]
mov esi, dword [esp + 0x80]
push 0
push dword [esp + 0x88]
call fcn.00406dc0
add esp, 8
test eax, eax
jne 0x4074b2
pop edi
mov eax, 0xfffffff4
pop esi
pop ebx
add esp, 0x68
ret
lea ecx, [esp + 0x34]
push ecx
call fcn.00405f97
lea edx, [esp + 0x44]
push edx
call fcn.00405f97
lea ecx, [esp + 0x30]
push ecx
call fcn.00405f97
lea edx, [esp + 0x64]
push edx
call fcn.00405f97
mov ecx, 1
lea edx, [esp + 0x5c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 3
mov dword [esp + 0x34], edx
add esp, 0x10
push dword [esp + 0x84]
push esi
call fcn.00406c77
add esp, 8
xor ecx, ecx
cmp eax, ecx
jns 0x40754a
cmp dword [esp + 0x78], ecx
je 0x407529
push ecx
push dword [esp + 0x7c]
call fcn.00406247
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
test edi, edi
je 0x407541
push esi
push edi
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
pop edi
xor eax, eax
pop esi
pop ebx
add esp, 0x68
ret
push esi
lea edx, [esp + 0x38]
push edx
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
push dword [esp + 0x84]
lea ecx, [esp + 0x44]
push ecx
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
mov edx, 1
mov dword [esp + 0x40], edx
mov dword [esp + 0x34], edx
mov ecx, dword [esi + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00405ff0
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
push 0
lea ecx, [esp + 0x2c]
push ecx
call fcn.00406247
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
mov edx, dword [esi + 4]
add edx, 2
push edx
lea ecx, [esp + 0x5c]
push ecx
call fcn.00405ff0
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
lea edx, [esp + 0x40]
push edx
call fcn.004063b3
add esp, 4
and eax, 0x1f
mov dword [esp + 0x64], eax
cmp eax, 0x1f
jae 0x40763f
mov ecx, 0x1f
sub ecx, dword [esp + 0x64]
mov dword [esp + 0x64], ecx
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.00406b60
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
push dword [esp + 0x64]
lea ecx, [esp + 0x44]
push ecx
call fcn.00406b60
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
jmp 0x407647
mov dword [esp + 0x64], 0
mov dword [esp + 0x7c], edi
mov edi, dword [esp + 0x38]
dec edi
mov dword [esp + 0x80], esi
mov esi, dword [esp + 0x44]
mov edx, edi
dec esi
sub edx, esi
shl edx, 5
push edx
lea ecx, [esp + 0x44]
push ecx
call fcn.00406b60
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x38]
push ecx
call fcn.00406d05
add esp, 8
test eax, eax
js 0x4076bb
mov ecx, edi
sub ecx, esi
mov edx, dword [esp + 0x30]
inc dword [edx + ecx*4]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
push edx
call fcn.004070b0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x40798d
jmp 0x40767b
mov edx, edi
sub edx, esi
shl edx, 5
push edx
lea ecx, [esp + 0x44]
push ecx
call fcn.00406c57
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
mov dword [esp + 0x68], edi
mov edi, dword [esp + 0x68]
cmp esi, dword [esp + 0x68]
jae 0x407908
mov edx, dword [esp + 0x68]
mov ecx, 0xffffffff
sub ecx, esi
shl edx, 5
shl ecx, 5
add edx, ecx
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x48]
mov ecx, dword [edx + edi*4]
mov ebx, dword [eax + esi*4]
cmp ecx, ebx
jb 0x407728
lea edx, [edi - 1]
sub edx, esi
mov eax, dword [esp + 0x30]
mov ecx, 0xffffffff
mov dword [eax + edx*4], ecx
jmp 0x407746
push 0
lea edx, [edx + edi*4]
push ebx
push dword [edx - 4]
push ecx
call fcn.004073c0
lea ecx, [edi - 1]
sub ecx, esi
mov edx, dword [esp + 0x40]
mov dword [edx + ecx*4], eax
add esp, 0x10
mov dword [esp + 0x70], edi
mov ecx, dword [esp + 0x70]
cmp ecx, 2
mov edx, 0
jb 0x407762
mov edx, dword [esp + 0x3c]
lea edx, [edx + ecx*4]
mov edx, dword [edx - 8]
mov eax, dword [esp + 0x24]
cmp ecx, 1
mov dword [eax], edx
mov edx, 0
jb 0x40777c
mov edx, dword [esp + 0x3c]
lea edx, [edx + ecx*4]
mov edx, dword [edx - 4]
mov eax, dword [esp + 0x24]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x24]
mov edx, dword [edx + ecx*4]
lea ecx, [ecx - 1]
sub ecx, esi
mov dword [ebx + 8], edx
mov edx, dword [esp + 0x30]
mov edi, ecx
inc dword [edx + ecx*4]
mov ecx, dword [esp + 0x30]
push 0
lea edx, [esp + 0x5c]
dec dword [ecx + edi*4]
push edx
call fcn.00406247
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
cmp esi, 1
mov ecx, 0
jb 0x4077d3
mov edx, dword [esp + 0x48]
lea ecx, [edx + esi*4]
mov ecx, dword [ecx - 4]
mov edx, dword [esp + 0x60]
mov dword [edx], ecx
mov ecx, dword [esp + 0x48]
mov edx, dword [ecx + esi*4]
mov ecx, dword [esp + 0x60]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x30]
push dword [edx + edi*4]
lea ecx, [esp + 0x5c]
push ecx
push ecx
call fcn.00407310
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x40798d
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x5c]
push ecx
call fcn.00406d05
add esp, 8
test eax, eax
jg 0x40779f
mov edi, dword [esp + 0x70]
lea edx, [edi - 1]
sub edx, esi
mov ecx, dword [esp + 0x30]
push dword [ecx + edx*4]
lea ecx, [esp + 0x44]
push ecx
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x24], edx
call fcn.00407310
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x40798d
push dword [esp + 0x6c]
lea edx, [esp + 0x5c]
push edx
call fcn.00406b60
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x38]
push edx
push edx
call fcn.004070b0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x40798d
push 0
lea ecx, [esp + 0x38]
push ecx
call fcn.00406dc0
add esp, 8
test eax, eax
jns 0x4078fa
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x5c]
push ecx
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
push dword [esp + 0x6c]
lea edx, [esp + 0x5c]
push edx
call fcn.00406b60
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x38]
push edx
push edx
call fcn.00407092
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x40798d
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
dec dword [edx + ecx*4]
add dword [esp + 0x6c], 0xffffffe0
dec edi
cmp esi, edi
jb 0x407703
cmp dword [esp + 0x78], 0
mov edi, dword [esp + 0x7c]
mov esi, dword [esp + 0x80]
je 0x407943
lea ecx, [esp + 0x28]
push ecx
push dword [esp + 0x7c]
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
mov edx, dword [esi]
mov ecx, dword [esp + 0x84]
imul edx, dword [ecx]
mov ecx, dword [esp + 0x78]
mov dword [ecx], edx
test edi, edi
je 0x40798d
push dword [esp + 0x64]
lea edx, [esp + 0x38]
push edx
call fcn.00406c57
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
mov ecx, dword [esi]
lea edx, [esp + 0x34]
mov dword [esp + 0x34], ecx
push edx
push edi
call fcn.00406160
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40798d
push 0
push edi
call fcn.00406dc0
add esp, 8
test eax, eax
jne 0x40798d
mov dword [edi], 1
lea esi, [esp + 0x34]
push esi
call fcn.00405fb0
lea edi, [esp + 0x44]
push edi
call fcn.00405fb0
lea ecx, [esp + 0x30]
push ecx
call fcn.00405fb0
lea edx, [esp + 0x64]
push edx
call fcn.00405fb0
push 0xc
lea eax, [esp + 0x60]
push eax
call fcn.0041a350
add esp, 0x18
mov eax, ebx
pop edi
pop esi
pop ebx
add esp, 0x68
ret