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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 4]
cmp eax, dword [ecx + 8]
jbe 0x508a7d
sub esp, 0x84
mov eax, dword [esp + 0x94]
mov dword [esp], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x10], ecx
call fcn.00507a70
mov eax, dword [esp + 0x14]
mov dword [esp + 0x64], eax
mov ecx, dword [esp + 0x8c]
mov edx, dword [ecx + 0x1c]
mov ebx, dword [esp + 0x90]
mov dword [esp], ebx
call edx
mov eax, dword [esp + 4]
mov eax, dword [eax + 4]
mov dword [esp + 0x68], eax
lea ecx, [0x64a5a0]
mov dword [esp], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x90]
mov dword [esp + 8], edx
call fcn.0040a2a0
mov eax, dword [esp + 0xc]
movzx ecx, byte [esp + 0x14]
mov edx, dword [esp + 0x10]
test cl, cl
je 0x508a1c
mov eax, dword [eax + 0x10]
mov dword [esp], edx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x64]
mov dword [esp], ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.004ddf40
mov eax, dword [esp + 0xc]
mov dword [esp + 0x54], eax
mov dword [esp], eax
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x68]
mov dword [esp + 8], ecx
call fcn.004de2c0
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov ecx, dword [esp + 0xa0]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.004ddf40
mov eax, dword [esp + 0xc]
mov dword [esp + 0x58], eax
mov dword [esp], eax
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x68]
mov dword [esp + 8], ecx
call fcn.004de2c0
lea eax, [0x64a540]
mov dword [esp], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 8], ecx
call fcn.0040a2a0
mov eax, dword [esp + 0xc]
movzx ecx, byte [esp + 0x14]
mov edx, dword [esp + 0x10]
test cl, cl
je 0x508884
mov dword [esp + 0x60], edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 8]
lea edx, [0x643900]
mov dword [esp], edx
shl ecx, 2
mov dword [esp + 0x34], ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.00444130
mov eax, dword [esp + 0xc]
mov dword [esp + 0x70], eax
mov ecx, dword [esp + 0x54]
mov edx, dword [ecx + 4]
mov ebx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
call fcn.004e9200
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
cmp ecx, eax
jb 0x508a77
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + 8]
lea edx, [0x643900]
mov dword [esp], edx
shl ecx, 2
mov dword [esp + 0x30], ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.00444130
mov eax, dword [esp + 0xc]
mov dword [esp + 0x6c], eax
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx + 4]
mov ebx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
call fcn.004e9200
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x44]
sub eax, ecx
mov edx, eax
neg eax
sar eax, 0x1f
and ecx, eax
mov eax, dword [esp + 0x70]
add eax, ecx
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
cmp ebx, ecx
jb 0x508a6e
mov ebp, dword [esp + 0x2c]
mov ebp, dword [ebp + 0x10]
mov dword [esp + 0x40], ebp
mov esi, dword [esp + 0x88]
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov ebp, dword [esp + 0x60]
mov dword [esp], ebp
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
sub ebx, ecx
mov eax, ebx
neg ebx
sar ebx, 0x1f
and ecx, ebx
mov edx, dword [esp + 0x6c]
add ecx, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x40]
call eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [eax + 8]
test edx, edx
jne 0x508869
xor edx, edx
test edx, edx
jne 0x5087ff
mov edx, dword [ecx + 8]
test edx, edx
jne 0x508854
xor ecx, ecx
test ecx, ecx
je 0x508845
mov dword [esp + 0x50], eax
mov dword [esp], eax
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x68]
mov dword [esp + 8], ecx
call fcn.004de2c0
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 4], eax
call fcn.004de4d0
mov eax, dword [esp + 8]
test eax, eax
sete al
mov byte [esp + 0xa8], al
add esp, 0x84
ret
mov byte [esp + 0xa8], 0
add esp, 0x84
ret
movzx ecx, byte [ecx]
test cl, cl
je 0x508862
mov ecx, 0xffffffff
jmp 0x5087fb
mov ecx, 1
jmp 0x5087fb
movzx edx, byte [eax]
test dl, dl
je 0x50887a
mov edx, 0xffffffff
jmp 0x5087ee
mov edx, 1
jmp 0x5087ee
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 8]
lea edx, [0x643900]
mov dword [esp], edx
shl ecx, 2
mov dword [esp + 0x3c], ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.00444130
mov eax, dword [esp + 0xc]
mov dword [esp + 0x70], eax
mov ecx, dword [esp + 0x54]
mov edx, dword [ecx + 4]
mov ebx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
call fcn.004e9200
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
cmp ecx, eax
jb 0x508a69
mov edx, dword [esp + 0x8c]
mov ebx, dword [edx + 0x20]
mov ebp, dword [esp + 0x90]
mov dword [esp], ebp
sub ecx, eax
mov esi, ecx
neg ecx
sar ecx, 0x1f
and eax, ecx
mov ecx, dword [esp + 0x70]
add eax, ecx
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], esi
call ebx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x48], ecx
mov edx, dword [esp + 0x58]
mov ebx, dword [edx + 8]
lea ebp, [0x643900]
mov dword [esp], ebp
shl ebx, 2
mov dword [esp + 0x38], ebx
mov dword [esp + 4], ebx
mov dword [esp + 8], ebx
call fcn.00444130
mov eax, dword [esp + 0xc]
mov dword [esp + 0x70], eax
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx + 4]
mov ebx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
call fcn.004e9200
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
cmp ecx, eax
jb 0x508a64
mov edx, dword [esp + 0x8c]
mov ebx, dword [edx + 0x24]
mov ebp, dword [esp + 0x88]
mov esi, dword [ebp + 8]
mov ebp, dword [ebp + 0xc]
mov edi, dword [esp + 0x90]
mov dword [esp], edi
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
sub ecx, eax
mov ebp, ecx
neg ecx
sar ecx, 0x1f
and eax, ecx
mov ecx, dword [esp + 0x70]
add eax, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
call ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x8c]
mov edx, dword [edx + 0x10]
mov ebx, dword [esp + 0x90]
mov dword [esp], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
call edx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
jmp 0x5087e5
mov byte [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
lea eax, [esp + 0x74]
mov dword [esp], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
call fcn.004e0450
mov eax, dword [esp + 0xc]
jmp 0x5085f4
call fcn.0045ca00
call fcn.0045ca00
mov eax, ecx
mov ecx, ebx
call fcn.0045ca00
call fcn.0045ca00
nop
call fcn.0045b380
jmp fcn.00508520