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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x38]
cmp eax, dword [ecx + 8]
jbe 0x501aa0
sub esp, 0xb8
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 0x2c]
test ecx, ecx
je 0x5015c2
mov ecx, dword [ecx]
jmp 0x5015c4
xor ecx, ecx
mov dword [esp + 0x3c], ecx
lea eax, [0x527ae0]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
call fcn.00448940
mov eax, dword [esp + 0xc]
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0xbc]
mov edx, dword [ecx + 0x2c]
lea edi, [esp + 0x88]
xor eax, eax
call fcn.00460c94
lea ecx, [0x518620]
mov dword [esp], ecx
mov dword [esp + 4], edx
lea ecx, [esp + 0x88]
mov dword [esp + 8], ecx
call fcn.0040d390
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x3c]
xor edx, edx
jmp 0x50164c
lea eax, [esp + 0x88]
mov dword [esp], eax
call fcn.0040d5c0
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x88]
test ebx, ebx
je 0x5016ca
mov ebx, dword [esp + 0x8c]
mov ebx, dword [ebx]
inc edx
cmp ecx, edx
jae 0x50169b
mov dword [esp + 0x7c], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
lea eax, [0x527ae0]
mov dword [esp + 0x10], eax
call fcn.00448ac0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov ebp, dword [0x64f2f0]
lea edi, [eax + edx*4 - 4]
test ebp, ebp
jne 0x5016be
mov dword [eax + edx*4 - 4], ebx
jmp 0x501631
mov eax, ebx
call fcn.00460a90
jmp 0x501631
mov dword [esp + 0x80], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x38], edx
call fcn.0040c1f0
mov eax, dword [0x64f2f0]
mov ecx, dword [esp]
test eax, eax
jne 0x5016f7
mov eax, dword [esp + 0xbc]
mov dword [eax + 0x2c], ecx
jmp 0x501708
mov edx, dword [esp + 0xbc]
lea edi, [edx + 0x2c]
mov eax, ecx
call fcn.00460a90
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov ecx, dword [esp + 0x38]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 8], edx
call fcn.004091e0
mov eax, dword [esp + 0xc]
lea ecx, [0x56a2d0]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004852d0
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x38]
xor ebx, ebx
jmp 0x50176c
mov ebp, dword [esp + 0x64]
lea ebx, [ebp + 1]
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x38]
cmp ebx, edx
jge 0x50180f
mov dword [esp + 0x64], ebx
mov ebp, dword [ecx + ebx*4]
mov dword [esp + 0x78], ebp
mov esi, dword [eax + 4]
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x60], edi
mov esi, dword [esi + 0xd0]
mov dword [esp + 0x5c], esi
add edi, 1
mov eax, edi
mul esi
mov dword [esp + 0x58], edx
mov dword [esp + 0x30], eax
mov ecx, dword [ebp]
mov dword [esp + 0x54], ecx
mov eax, ecx
mul esi
mov ecx, dword [esp + 0x60]
add ecx, 1
mov ecx, 0
adc ecx, 0
sar esi, 0x1f
mov dword [esp + 0x50], esi
imul edi, esi
mov esi, dword [esp + 0x5c]
imul ecx, esi
mov esi, dword [esp + 0x58]
add ecx, esi
add ecx, edi
mov esi, dword [ebp + 4]
mov edi, dword [esp + 0x5c]
imul esi, edi
add esi, edx
mov edi, dword [esp + 0x54]
mov edx, ebp
mov ebp, dword [esp + 0x50]
imul edi, ebp
lea ebp, [edi + esi]
mov esi, dword [esp + 0xbc]
mov edi, dword [esp + 0x30]
mov dword [esp + 0x68], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x68]
jmp 0x50196a
mov ebp, dword [eax + 4]
movzx esi, byte [ebp + 0x79]
xchg esi, eax
test al, al
xchg esi, eax
jne 0x50184c
mov eax, dword [ebp + 0xac]
mov dword [esp], eax
call fcn.004aa840
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
test eax, eax
jne 0x501850
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x38]
xor ebx, ebx
jmp 0x501866
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], edx
add esp, 0xb8
ret
inc ebx
cmp ebx, edx
jge 0x501908
mov ebp, dword [ecx + ebx*4]
mov esi, dword [ebp + 0xc]
test esi, esi
jne 0x501865
mov esi, dword [eax + 4]
mov esi, dword [esi + 0xd0]
cmp esi, 0xfffffff
ja 0x501925
mov dword [esp + 0x64], ebx
test esi, esi
je 0x5018b1
mov dword [esp + 0x74], ebp
mov dword [esp + 0x48], esi
mov dword [esp], ebp
mov dword [esp + 4], esi
call fcn.004611c0
mov ebp, dword [esp + 0x74]
mov esi, dword [esp + 0x48]
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], esi
call fcn.004091e0
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 4]
test byte [ecx], al
add ecx, 0xf8
mov edx, dword [esp + 0xc]
mov dword [esp], ecx
lea ecx, [0x5141c0]
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.00467b90
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x64]
jmp 0x501865
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0
add esp, 0xb8
ret
mov edx, esi
mov ebx, 0xfffffff
call fcn.00460b90
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
add eax, ecx
mov ebp, dword [esp + 0x44]
mov edx, dword [esp + 0x2c]
adc ebp, edx
mov edx, dword [esp + 0x24]
add ecx, edx
mov edx, dword [esp + 0x78]
mov esi, dword [esp + 0xbc]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x50]
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebp
test ecx, ecx
sete al
xchg ebp, ebx
seta bl
xchg ebp, ebx
cmp edi, 0xffffffe
xchg esi, ebx
seta bl
xchg esi, ebx
and eax, esi
or ebp, eax
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x50199e
mov eax, 0xffffffe
xor ebp, ebp
jmp 0x5019a2
mov eax, edi
mov ebp, ecx
cmp eax, 0xfffffff
ja 0x501a93
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x4c], edi
mov ecx, dword [esp + 0xbc]
mov ebx, dword [ecx + 4]
mov ebx, dword [ebx + 0x158]
mov ebp, dword [ebx]
mov esi, dword [esp + 0x24]
lea edi, [edx + esi]
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov edi, dword [esp + 0x44]
mov dword [esp + 0x10], edi
mov esi, dword [esp + 0x40]
mov dword [esp + 0xc], esi
mov edx, ebx
call ebp
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test eax, eax
jne 0x501a7e
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x28]
sub eax, ecx
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
sbb edx, ebx
mov dword [esp + 0x50], edx
test eax, eax
xchg ebp, ebx
sete bl
xchg ebp, ebx
xchg ebp, eax
mov byte [esp + 0x23], al
xchg ebp, eax
test edx, edx
xchg esi, ebx
sete bl
xchg esi, ebx
xchg esi, eax
mov byte [esp + 0x22], al
xchg esi, eax
nop
mov edi, dword [esp + 0xbc]
add edi, 0x80
mov dword [esp], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 1
call fcn.00464f50
movzx eax, byte [esp + 0x22]
movzx ecx, byte [esp + 0x23]
and eax, ecx
test al, al
je 0x501931
jmp 0x501753
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], ebx
add esp, 0xb8
ret
mov edx, eax
mov ebx, 0xfffffff
call fcn.00460b90
nop
call fcn.0045f680
jmp fcn.00501590