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

Disassembly:
sub esp, 0x3c
push ebx
mov ebx, dword [esp + 0x48]
push ebp
mov ebp, ecx
xor ecx, ecx
cmp ebx, ecx
jne 0x48005b
pop ebp
xor eax, eax
pop ebx
add esp, 0x3c
ret 0x20
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
push esi
mov esi, dword [eax + 4]
push edi
mov edi, dword [eax]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], edi
cmp dword [esp + 0x64], ecx
je 0x480097
push edx
call fcn.004be6a0
add esp, 4
test eax, eax
je 0x4800ce
jmp 0x4800c6
lea ecx, [ebx - 1]
xor eax, eax
test ecx, ecx
jle 0x4800ce
mov ebx, 0xd
cmp bx, word [edx + eax*2]
jne 0x4800b7
mov ebx, 0xa
cmp bx, word [edx + eax*2 + 2]
je 0x4800c2
inc eax
cmp eax, ecx
jl 0x4800a0
mov ebx, dword [esp + 0x54]
jmp 0x4800ce
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x28], 1
lea eax, [ebx + ebx*4]
add eax, eax
cmp eax, 0x3e8
jg 0x4800df
mov eax, 0x3e8
xor ecx, ecx
mov dword [esp + 0x30], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ff95f
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xec]
imul eax, eax, 0x190
add eax, 0x5bd258
mov dword [esp + 0x40], eax
xor eax, eax
add esp, 4
cmp dword [esp + 0x6c], eax
je 0x480405
mov eax, dword [ebp + 0x2e8]
lea ecx, [eax - 1]
lea edx, [eax + eax*8]
mov eax, dword [ebp + 0x334]
mov eax, dword [eax + edx*4 - 0x24]
dec eax
cmp esi, dword [ebp + 0x2e8]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], eax
jge 0x4801da
lea esp, [esp]
cmp dword [esp + 0x64], 0
mov dword [esp + 0x38], 0
je 0x48018c
mov edx, dword [esp + 0x50]
mov ecx, 0x5e
cmp cx, word [edx]
jne 0x48018c
test edi, edi
jle 0x48018c
cmp esi, dword [esp + 0x20]
jge 0x480184
inc esi
xor edi, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
jmp 0x48018c
mov dword [esp + 0x38], 1
cmp dword [esp + 0x28], 0
je 0x4801f3
mov eax, dword [esp + 0x30]
push edi
push esi
add eax, 0xfffffff6
push eax
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x20]
push edx
mov ecx, ebp
call fcn.0046ec80
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x6c]
push 0
push 1
push ecx
mov ecx, dword [esp + 0x3c]
push edx
push esi
push edi
mov ebx, eax
mov eax, dword [esp + 0x4c]
push ecx
push eax
mov ecx, ebp
inc ebx
mov dword [esp + 0x34], eax
call fcn.0047e3b0
test eax, eax
jne 0x48021e
mov edx, dword [esp + 0x34]
push edx
call fcn.004ff96a
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3c
ret 0x20
mov eax, dword [ebp + 0x334]
lea edx, [esi + esi*8]
mov ecx, dword [eax + edx*4 + 8]
mov ebx, dword [eax + edx*4]
lea eax, [eax + edx*4]
lea edx, [ecx + edi*2]
lea eax, [esi + 1]
mov dword [esp + 0x14], edx
sub ebx, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x6c], 0
dec ebx
cmp dword [esp + 0x38], 0
jne 0x4802cd
cmp dword [esp + 0x64], 0
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x38], ecx
je 0x480271
mov edx, dword [esp + 0x14]
lea ecx, [ebp + 0x1e8]
push edx
call fcn.004c3a30
mov eax, dword [esp + 0x5c]
push eax
lea eax, [ebp + 0x1e8]
push eax
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x44]
push edx
push eax
push ebx
push 0
call fcn.0046e7c0
add esp, 0x1c
jmp 0x4802c4
cmp dword [esp + 0x60], 0
je 0x48029e
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push ebx
push 0
push edx
call fcn.0046e6c0
add esp, 0x1c
jmp 0x4802b9
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push ebx
push 0
push eax
call fcn.0046e540
add esp, 0x18
mov ecx, dword [esp + 0x38]
lea edx, [eax + ecx]
mov dword [esp + 0x48], edx
cmp eax, 0xffffffff
jne 0x48038a
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
cmp esi, eax
jg 0x480332
jne 0x4802e5
mov eax, dword [esp + 0x6c]
cmp eax, dword [esp + 0x2c]
jge 0x480332
cmp dword [esp + 0x28], 0
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
je 0x480379
mov edx, dword [esp + 0x54]
xor ecx, ecx
test edx, edx
jle 0x480379
lea eax, [esi + esi*8]
add eax, eax
add eax, eax
lea ecx, [ecx]
test edi, edi
jle 0x480317
dec edi
jmp 0x48032b
test esi, esi
jle 0x48032b
mov edi, dword [ebp + 0x334]
mov edi, dword [eax + edi - 0x24]
sub eax, 0x24
dec esi
dec edi
inc ecx
inc ecx
cmp ecx, edx
jl 0x480310
jmp 0x480371
cmp dword [esp + 0x68], 0
je 0x4801da
cmp dword [esp + 0x24], 0
jne 0x4801da
cmp dword [0x5c30e8], 0
jne 0x4801da
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
xor edi, edi
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], edx
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
cmp esi, dword [ebp + 0x2e8]
jl 0x480150
jmp 0x4801da
push edi
push esi
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
call fcn.0046ec80
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x38]
push ecx
push eax
mov dword [esi + 4], eax
push edx
mov dword [esi], ecx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
call fcn.0046ec80
cmp dword [esp + 0x68], 0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esi + 0xc], edx
mov dword [esi + 8], eax
je 0x4803e9
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00478240
add esp, 4
mov edx, dword [esp + 0x34]
push edx
call fcn.004ff96a
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3c
ret 0x20
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], eax
cmp esi, eax
jne 0x480441
cmp edi, eax
jne 0x480447
cmp dword [esp + 0x68], eax
je 0x480447
mov esi, dword [ebp + 0x2e8]
mov edx, dword [ebp + 0x334]
dec esi
lea ecx, [esi + esi*8]
mov edi, dword [edx + ecx*4]
dec edi
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
cmp esi, eax
jl 0x4801da
cmp dword [esp + 0x28], 0
je 0x48049e
push edi
push esi
mov eax, 0xa
sub eax, dword [esp + 0x38]
lea ecx, [esp + 0x74]
push eax
push ecx
lea edx, [esp + 0x20]
push edx
mov ecx, ebp
call fcn.0046ec80
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x30]
push 0
push 1
push esi
mov esi, dword [esp + 0x1c]
push edi
push esi
push ecx
mov ebx, eax
mov eax, dword [esp + 0x4c]
push edx
push eax
mov ecx, ebp
inc ebx
mov dword [esp + 0x34], eax
call fcn.0047e3b0
test eax, eax
je 0x4801da
dec ebx
jmp 0x4804d7
test edi, edi
jne 0x4804b8
test esi, esi
jle 0x4801da
mov ecx, dword [ebp + 0x334]
dec esi
lea eax, [esi + esi*8]
mov edi, dword [ecx + eax*4]
dec edi
mov eax, dword [ebp + 0x334]
lea edx, [esi + esi*8]
mov ecx, dword [eax + edx*4 + 8]
mov dword [esp + 0x14], ecx
mov ebx, edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x6c], 0
cmp dword [esp + 0x64], 0
mov eax, dword [esp + 0x54]
mov dword [esp + 0x38], eax
je 0x480512
mov edx, dword [esp + 0x14]
lea edi, [ebp + 0x1e8]
push edx
mov ecx, edi
call fcn.004c3a30
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x50]
push eax
push edi
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push 0
call fcn.0046e960
jmp 0x480553
cmp dword [esp + 0x60], 0
je 0x48053b
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
mov eax, dword [esp + 0x5c]
push eax
push ebx
push 0
push ecx
call fcn.0046e8e0
add esp, 0x1c
jmp 0x480556
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x58]
push eax
push ebx
push 0
push ecx
call fcn.0046e870
add esp, 0x18
cmp eax, 0xffffffff
jne 0x48061f
mov eax, dword [esp + 0x20]
cmp esi, eax
jl 0x4805c3
jne 0x480573
mov edx, dword [esp + 0x6c]
cmp edx, dword [esp + 0x2c]
jle 0x4805c3
cmp dword [esp + 0x28], 0
mov edi, dword [esp + 0x6c]
je 0x480612
mov edx, dword [esp + 0x54]
xor eax, eax
test edx, edx
jle 0x480612
mov ebx, dword [ebp + 0x334]
lea ecx, [esi + esi*8]
lea ecx, [ebx + ecx*4]
lea esp, [esp]
mov ebx, dword [ecx]
dec ebx
cmp edi, ebx
jge 0x4805aa
inc edi
jmp 0x4805bc
mov ebx, dword [ebp + 0x2e8]
dec ebx
cmp esi, ebx
jge 0x4805bc
inc esi
add ecx, 0x24
xor edi, edi
inc eax
inc eax
cmp eax, edx
jl 0x4805a0
jmp 0x480612
cmp dword [esp + 0x68], 0
je 0x4801da
cmp dword [esp + 0x24], 0
jne 0x4801da
cmp dword [0x5c30e8], 0
jne 0x4801da
mov edx, dword [esp + 0x40]
mov esi, dword [ebp + 0x2e8]
mov eax, dword [esp + 0x44]
dec esi
mov dword [esp + 0x20], edx
mov edx, dword [ebp + 0x334]
lea ecx, [esi + esi*8]
mov edi, dword [edx + ecx*4]
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], eax
dec edi
test esi, esi
jge 0x480447
jmp 0x4801da
mov ecx, dword [esp + 0x6c]
push ecx
push esi
push eax
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x20]
push eax
mov ecx, ebp
call fcn.0046ec80
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x58]
push ecx
push eax
mov dword [esi], ecx
mov ecx, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x78]
mov dword [esi + 4], eax
push edx
lea eax, [esp + 0x20]
push eax
mov ecx, ebp
call fcn.0046ec80
cmp dword [esp + 0x68], 0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x6c]
mov dword [esi + 0xc], ecx
mov dword [esi + 8], edx
je 0x480682
mov eax, dword [esp + 0x24]
push eax
call fcn.00478240
add esp, 4
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004ff96a
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3c
ret 0x20