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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x6587e824
sub esp, 0x50
lea eax, [0x658d5480]
mov dword [esp], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x60]
mov dword [esp + 8], ecx
call fcn.658095d0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
test eax, eax
jne 0x6587e65f
lea eax, [0x658d53c0]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], ecx
call fcn.658095d0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
test eax, eax
jne 0x6587e623
mov eax, dword [esp + 0x64]
test eax, eax
je 0x6587e597
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
jmp 0x6587e60e
mov eax, dword [esp + 0x5c]
lea ecx, [0x6599c8a8]
cmp eax, ecx
jne 0x6587e5ab
mov eax, dword [esp + 0x60]
jmp 0x6587e5b0
mov eax, 0
jne 0x6587e5e5
mov ecx, dword [eax + 0xc]
test ecx, ecx
setl cl
sete dl
mov eax, dword [eax + 8]
cmp eax, 0x8000
setb bl
and ebx, edx
or ebx, ecx
test bl, bl
je 0x6587e5e5
cmp eax, 1
setb bl
and ebx, edx
or ebx, ecx
test bl, bl
je 0x6587e5ea
mov eax, 1
jmp 0x6587e5ea
mov eax, 0x8000
mov dword [esp + 0x1c], eax
lea ecx, [0x658d3c20]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], eax
call fcn.65849aa0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
mov edx, ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], ecx
xor ebx, ebx
xor ebp, ebp
jmp 0x6587e6ab
mov eax, dword [eax + 0x10]
mov dword [esp], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 8], ecx
call eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], edx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ebx
add esp, 0x50
ret
mov eax, dword [eax + 0x10]
mov dword [esp], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], ecx
call eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], edx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ebx
add esp, 0x50
ret
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x3c]
mov ebx, esi
mov ebp, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebx
mov esi, dword [esp + 0x5c]
mov edi, dword [esi + 0x10]
mov esi, dword [esp + 0x60]
mov dword [esp], esi
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
call edi
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x44], ebp
test ecx, ecx
jg 0x6587e6fc
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
jmp 0x6587e797
mov esi, dword [esp + 0x38]
cmp esi, ecx
jb 0x6587e81c
mov dword [esp + 0x20], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x10]
mov ebx, dword [esp + 0x58]
mov dword [esp], ebx
mov ebp, dword [esp + 0x4c]
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], esi
call edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
test eax, eax
jge 0x6587e74a
mov ebx, dword [esp + 0x20]
jmp 0x6587e752
mov ebx, dword [esp + 0x20]
cmp eax, ebx
jle 0x6587e764
test ecx, ecx
jne 0x6587e762
mov ecx, dword [0x65a0e570]
mov edx, dword [0x65a0e574]
xor eax, eax
mov ebp, dword [esp + 0x34]
mov esi, ebp
add ebp, eax
mov edi, eax
sar eax, 0x1f
add esi, edi
mov esi, dword [esp + 0x30]
adc esi, eax
test ecx, ecx
jne 0x6587e802
cmp edi, ebx
jne 0x6587e7ee
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x24]
mov ecx, ebp
mov ebp, dword [esp + 0x44]
test ebx, ebx
je 0x6587e69b
mov edi, dword [0x65a0e544]
cmp dword [0x65a0e540], eax
jne 0x6587e808
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], esi
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], edi
call fcn.65803cc0
movzx eax, byte [esp + 0xc]
test al, al
je 0x6587e7dc
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
xor ebx, ebx
xor ebp, ebp
jmp 0x6587e808
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x28]
jmp 0x6587e808
mov ecx, dword [0x65a0e560]
mov edx, dword [0x65a0e564]
mov ebx, ecx
mov ecx, ebp
mov ebp, edx
jmp 0x6587e808
mov ebx, ecx
mov ecx, ebp
mov ebp, edx
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebp
add esp, 0x50
ret
mov edx, esi
call fcn.6585fbd0
nop
call fcn.6585e6e0
jmp fcn.6587e510