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

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
xor esi, esi
push ebx
mov ebx, eax
and esp, 0xfffffff0
sub esp, 0x4f0
mov eax, dword [0xd48044]
mov dword [esp + 0x4ec], eax
xor eax, eax
mov word [esp + 0x64], si
mov word [esp + 0x66], di
test ebx, ebx
je 0x585d27
mov eax, dword [ebx]
mov edi, edx
mov edx, dword [ebx + 4]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], edx
test edi, edi
je 0x585d10
mov dword [esp], edi
mov esi, ecx
call fcn.0040f988
mov dword [esp + 0x5c], eax
test eax, eax
je 0x585d10
mov eax, dword [ebx + 0x5c]
test eax, eax
je 0x585890
mov dword [esp], eax
call fcn.0040f8d8
mov dword [ebx + 0x5c], 0
cmp dword [ebx + 0x14], 1
mov edx, dword [esp + 0x5c]
mov eax, edi
je 0x585c00
call fcn.005b2ee0
test eax, eax
mov dword [ebx + 0x5c], eax
mov dword [esp + 0x58], eax
je 0x585d10
mov eax, dword [ebx + 0x10]
mov esi, dword [ebx]
vpxor xmm0, xmm0, xmm0
mov dword [ebx + 0x70], 0
mov ecx, dword [ebx + 0x50]
mov edi, dword [ebx + 4]
vmovdqu xmmword [ebx + 0x60], xmm0
vpxor xmm0, xmm0, xmm0
mov dword [ebx + 0x58], eax
lea eax, [ebx + 0x80]
mov dword [esp + 0x40], eax
mov eax, ecx
and eax, 0xf
mov dword [ebx + 0x78], esi
mov dword [esp + 0x3c], eax
setne al
movzx eax, al
mov dword [ebx + 0x7c], edi
shl eax, 3
mov dword [ebx + 0xa0], esi
mov word [ebx + 0xa8], ax
mov eax, ebx
mov dword [ebx + 0xa4], edi
mov dword [ebx + 0x4e008], 0
vmovdqu xmmword [ebx + 0x80], xmm0
vmovdqu xmmword [ebx + 0x8e], xmm0
mov dword [esp + 0x48], ecx
call fcn.0059e4b0
mov edx, dword [ebx + 0x48]
mov dword [esp + 0x44], eax
test edx, edx
mov edx, dword [esp + 0x58]
je 0x585945
cmp dword [ebx + 0x14], 2
je 0x585980
mov eax, 0xfffffffc
mov dword [esp], edx
mov dword [esp + 0x5c], eax
call fcn.0040f8d8
mov dword [ebx + 0x5c], 0
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x4ec]
sub edx, dword [0xd48044]
jne 0x585d53
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x48]
mov eax, 0xfffffffb
and ecx, 0x400
mov dword [esp + 0x58], ecx
jne 0x58594a
mov eax, dword [esp + 0x44]
mov edx, esi
mov ecx, edi
mov dword [esp], eax
mov eax, ebx
call fcn.0059fdb0
test eax, eax
je 0x585ce8
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x50]
mov dword [esp], 0
xor edx, edx
mov edi, dword [esp + 0x54]
mov dword [esp + 0x4c], edx
add esi, eax
mov dword [esp + 0x48], eax
adc edi, edx
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], edi
call fcn.005aa8e0
lea ecx, [esp + 0x66]
lea edx, [esp + 0x64]
mov dword [ebx + 0x4e00c], eax
call fcn.00599a60
mov eax, 0xfffffffe
cmp eax, esi
mov eax, dword [esp + 0x58]
sbb eax, edi
mov eax, 0
jae 0x585a08
lea eax, [esp + 0x68]
mov dword [esp], eax
xor ecx, ecx
xor edx, edx
lea eax, [esp + 0x4d0]
call fcn.0059e8f0
mov edi, dword [esp + 0x40]
movzx edx, word [esp + 0x5c]
mov dword [esp + 0x18], 0x808
mov esi, eax
movzx ecx, ax
movzx eax, word [esp + 0x66]
mov dword [esp + 0x20], eax
movzx eax, word [esp + 0x64]
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 0xa8]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov eax, edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp], 0
mov dword [esp + 4], 0
call fcn.0059e740
test eax, eax
je 0x585ce8
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
add edx, dword [ebx + 0x78]
adc ecx, dword [ebx + 0x7c]
mov dword [ebx + 0xa0], edx
mov dword [ebx + 0xa4], ecx
mov dword [esp + 0x10], 0x1e
mov dword [esp + 0xc], edi
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov eax, dword [ebx + 0x44]
mov dword [esp], eax
call dword [ebx + 0x3c]
cmp eax, 0x1e
jne 0x585ce8
mov edx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x20]
mov edi, edx
or edi, eax
je 0x585aee
mov ecx, dword [ebx + 0xa0]
add eax, 0xffffffff
adc edx, 0xffffffff
and ecx, eax
mov eax, dword [ebx + 0xa4]
and eax, edx
or eax, ecx
jne 0x585d31
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x5c]
xor edx, edx
add eax, 0x1e
add eax, dword [ebx + 0x78]
adc edx, dword [ebx + 0x7c]
mov dword [ebx + 0x78], eax
mov dword [ebx + 0x7c], edx
mov dword [esp + 0x10], edi
mov ecx, dword [ebx + 0x5c]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x44]
mov dword [esp], eax
call dword [ebx + 0x3c]
cmp edi, eax
jne 0x585d20
xor edx, edx
mov eax, dword [esp + 0x5c]
lea edi, [esp + 0x4d0]
add eax, dword [ebx + 0x78]
adc edx, dword [ebx + 0x7c]
mov dword [ebx + 0x78], eax
mov dword [ebx + 0x7c], edx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x44]
mov dword [esp], eax
call dword [ebx + 0x3c]
cmp esi, eax
jne 0x585d20
mov eax, dword [esp + 0x3c]
xor edi, edi
add esi, dword [ebx + 0x78]
adc edi, dword [ebx + 0x7c]
mov dword [ebx + 0x78], esi
mov dword [ebx + 0x7c], edi
test eax, eax
je 0x585ccd
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0xb0], ebx
mov dword [ebx + 0xb8], esi
mov dword [ebx + 0xbc], edi
mov dword [ebx + 0xc0], 0
mov dword [ebx + 0xc4], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xfffffff1
mov dword [esp], eax
call fcn.005a7600
mov dword [esp + 4], 0x59cb10
mov dword [esp + 0xc], eax
lea eax, [ebx + 0xb0]
mov dword [esp + 8], eax
lea eax, [ebx + 0xc8]
mov dword [esp], eax
call fcn.005a8800
test eax, eax
je 0x585ccd
mov eax, 0xfffffff7
jmp 0x585ced
call fcn.005b2b00
mov dword [ebx + 0x5c], eax
test eax, eax
je 0x585d10
shl esi, 8
mov dword [esp + 8], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [esp + 0x5c], eax
call fcn.00598450
mov edx, dword [esp + 0x5c]
test eax, eax
mov dword [ebx + 0x58], eax
js 0x585cd8
lea edx, [esp + 0x70]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], ebx
call fcn.00597960
test eax, eax
je 0x585d00
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x7c]
vmovdqu xmm1, xmmword [esp + 0x98]
vshufpd xmm0, xmm1, xmmword [esp + 0x88], 2
vmovdqu xmmword [ebx + 0x60], xmm0
mov dword [ebx + 0x70], eax
mov eax, dword [esp + 0x78]
mov dword [ebx + 0x7c], edx
mov edx, dword [esp + 0xac]
mov dword [ebx + 0x78], eax
mov eax, dword [esp + 0xa8]
mov dword [ebx + 0xa4], edx
mov dword [ebx + 0xa0], eax
movzx eax, word [esp + 0x86]
mov word [ebx + 0xa8], ax
mov eax, dword [esp + 0xa4]
mov dword [ebx + 0x4e008], eax
mov eax, dword [esp + 0x4c0]
mov dword [ebx + 0x4e00c], eax
xor eax, eax
jmp 0x585961
mov eax, 0xfffffffd
jmp 0x58594a
mov eax, 0xfffffff9
mov edx, dword [ebx + 0x5c]
test edx, edx
je 0x585961
jmp 0x58594a
mov eax, 0xfffffffd
jmp 0x585ced
mov eax, 0xfffffffe
jmp 0x585961
mov eax, 0xfffffff8
jmp 0x585ced
mov eax, 0xffffffff
jmp 0x585961
mov dword [esp + 8], 0x4c0
mov dword [esp + 4], 0xd40a60
mov dword [esp], 0xd40aa4
call dword [0x6c87bc]
jmp 0x585aee
call fcn.00401690
nop
nop
nop
nop
nop
nop
nop
nop
sub esp, 0x3c
mov edx, dword [0xa8f340]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x1c], eax
mov eax, dword [0xd48044]
mov dword [esp + 0x2c], eax
xor eax, eax
test edx, edx
jg 0x585d97
mov ecx, dword [0x80dfc0]
test ecx, ecx
jg 0x585d97
mov edx, dword [0x88e000]
test edx, edx
jle 0x585da8
lea eax, [esp + 0x1c]
mov dword [esp], eax
call fcn.004d93e0
mov eax, 1
mov edx, dword [esp + 0x2c]
sub edx, dword [0xd48044]
jne 0x585db8
add esp, 0x3c
ret
call fcn.00401690
nop
nop
nop