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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xe8]
cmp eax, dword [ecx + 8]
jbe 0x585ef5
sub esp, 0x168
mov ecx, dword [esp + 0x18c]
lea eax, [ecx - 0x10]
cmp ecx, eax
jb 0x585eef
mov dword [esp + 0x28], eax
lea edi, [esp + 0x40]
xor eax, eax
call fcn.00463368
mov ecx, dword [esp + 0x16c]
test byte [ecx], al
lea edi, [esp + 0xb0]
call fcn.00463346
lea ecx, [esp + 0xb0]
mov dword [esp], ecx
mov ecx, dword [esp + 0x16c]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x20
mov dword [esp + 0xc], 0x20
mov ecx, dword [esp + 0x17c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x180]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x184]
mov dword [esp + 0x18], ecx
call fcn.00582840
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x164], ecx
mov dword [esp], ecx
lea edx, [esp + 0x40]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x20
mov dword [esp + 0xc], 0x20
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 0x20
mov dword [esp + 0x18], 0x20
call fcn.00582b90
mov ecx, dword [esp + 0x190]
mov edx, dword [esp + 0x18c]
sub ecx, edx
add ecx, 0x10
mov ebp, ecx
neg ecx
sar ecx, 0x1f
mov esi, dword [esp + 0x28]
and ecx, esi
mov eax, ebp
mov ebp, dword [esp + 0x188]
add ecx, ebp
nop
mov edi, ecx
mov ecx, dword [esp + 0x164]
mov edx, dword [ecx + 0x20]
mov dword [esp + 0x3c], edx
mov ebx, dword [ecx + 0x70]
shr ebx, 6
sub edx, ebx
movzx ebx, byte [ecx + 0x74]
test bl, bl
jne 0x585ed7
cmp edx, 1
ja 0x585ed7
mov dword [esp + 0x38], eax
mov dword [esp + 0x160], edi
mov edx, dword [esp + 0x3c]
cmp edx, 1
jbe 0x585a39
dec edx
shl edx, 6
mov dword [ecx + 0x70], edx
jmp 0x585a47
mov dword [ecx + 0x20], 1
mov dword [ecx + 0x70], 0
nop
lea edi, [esp + 0x60]
xor eax, eax
call fcn.0046335c
nop
movzx ecx, byte [esp + 0x40]
movzx edx, byte [esp + 0x41]
mov ebx, edx
shl edx, 8
or ecx, edx
movzx edx, byte [esp + 0x42]
mov ebp, edx
shl edx, 0x10
or edx, ecx
movzx ecx, byte [esp + 0x43]
mov esi, ecx
shl ecx, 0x18
or ecx, edx
and ecx, 0xfffffff
movzx edx, byte [esp + 0x44]
mov eax, edx
movzx edx, byte [esp + 0x45]
mov edi, edx
movzx edx, byte [esp + 0x46]
mov dword [esp + 0x3c], edx
movzx edx, byte [esp + 0x47]
mov dword [esp + 0x78], ecx
shr ebx, 0x18
shr ebp, 0x10
or ebp, ebx
shr esi, 8
or ebp, esi
or eax, ebp
shl edi, 8
or eax, edi
mov ecx, dword [esp + 0x3c]
shl ecx, 0x10
or ecx, eax
shl edx, 0x18
or ecx, edx
and ecx, 0xffffffc
mov dword [esp + 0x7c], ecx
movzx ecx, byte [esp + 0x48]
movzx edx, byte [esp + 0x49]
mov ebx, edx
shl edx, 8
or ecx, edx
movzx edx, byte [esp + 0x4a]
mov ebp, edx
shl edx, 0x10
or edx, ecx
movzx ecx, byte [esp + 0x4b]
mov esi, ecx
shl ecx, 0x18
or ecx, edx
and ecx, 0xffffffc
movzx edx, byte [esp + 0x4c]
mov eax, edx
movzx edx, byte [esp + 0x4d]
mov edi, edx
movzx edx, byte [esp + 0x4e]
mov dword [esp + 0x3c], edx
movzx edx, byte [esp + 0x4f]
mov dword [esp + 0x80], ecx
shr ebx, 0x18
shr ebp, 0x10
or ebp, ebx
shr esi, 8
or ebp, esi
or eax, ebp
shl edi, 8
or eax, edi
mov ecx, dword [esp + 0x3c]
shl ecx, 0x10
or ecx, eax
shl edx, 0x18
or ecx, edx
and ecx, 0xffffffc
mov dword [esp + 0x84], ecx
movzx ecx, byte [esp + 0x50]
movzx edx, byte [esp + 0x51]
mov ebx, edx
shl edx, 8
or ecx, edx
movzx edx, byte [esp + 0x52]
mov ebp, edx
shl edx, 0x10
or edx, ecx
movzx ecx, byte [esp + 0x53]
mov esi, ecx
shl ecx, 0x18
or edx, ecx
movzx ecx, byte [esp + 0x54]
mov eax, ecx
movzx ecx, byte [esp + 0x55]
mov edi, ecx
movzx ecx, byte [esp + 0x56]
mov dword [esp + 0x3c], ecx
movzx ecx, byte [esp + 0x57]
mov dword [esp + 0x88], edx
shr ebx, 0x18
shr ebp, 0x10
or ebx, ebp
shr esi, 8
or ebx, esi
or eax, ebx
shl edi, 8
or eax, edi
mov edx, dword [esp + 0x3c]
shl edx, 0x10
or edx, eax
shl ecx, 0x18
or edx, ecx
mov dword [esp + 0x8c], edx
movzx ecx, byte [esp + 0x58]
movzx edx, byte [esp + 0x59]
mov ebx, edx
shl edx, 8
or ecx, edx
movzx edx, byte [esp + 0x5a]
mov ebp, edx
shl edx, 0x10
or edx, ecx
movzx ecx, byte [esp + 0x5b]
mov esi, ecx
shl ecx, 0x18
or ecx, edx
movzx edx, byte [esp + 0x5c]
mov eax, edx
movzx edx, byte [esp + 0x5d]
mov edi, edx
movzx edx, byte [esp + 0x5e]
mov dword [esp + 0x3c], edx
movzx edx, byte [esp + 0x5f]
mov dword [esp + 0x90], ecx
shr ebx, 0x18
shr ebp, 0x10
or ebx, ebp
shr esi, 8
or ebx, esi
or eax, ebx
shl edi, 8
or eax, edi
mov ecx, dword [esp + 0x3c]
shl ecx, 0x10
or ecx, eax
shl edx, 0x18
or ecx, edx
mov dword [esp + 0x94], ecx
lea ecx, [esp + 0x60]
mov dword [esp], ecx
mov edx, dword [esp + 0x194]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x198]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x19c]
mov dword [esp + 0xc], ebx
call fcn.00585130
lea ecx, [esp + 0x60]
mov dword [esp], ecx
mov edx, dword [esp + 0x188]
mov dword [esp + 4], edx
mov ebx, dword [esp + 0x28]
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0x190]
mov dword [esp + 0xc], ebp
call fcn.00585130
lea ecx, [esp + 0x60]
mov dword [esp], ecx
mov edx, dword [esp + 0x198]
mov dword [esp + 4], edx
call fcn.00585220
lea ecx, [esp + 0x60]
mov dword [esp], ecx
mov edx, dword [esp + 0x28]
mov dword [esp + 4], edx
call fcn.00585220
nop
mov eax, dword [esp + 0x174]
mov ecx, dword [esp + 0x18c]
lea edx, [ecx + eax - 0x10]
mov dword [esp + 0x2c], edx
mov ebx, dword [esp + 0x178]
cmp ebx, edx
jl 0x585ced
jb 0x585ece
mov ebp, dword [esp + 0x170]
jmp 0x585d28
lea ecx, [0x696c40]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x170]
mov dword [esp + 0xc], ecx
call fcn.0044b630
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18c]
mov edx, dword [esp + 0x2c]
mov ebx, edx
mov ebp, eax
mov eax, dword [esp + 0x174]
cmp eax, edx
ja 0x585ec7
mov dword [esp + 0x34], ebx
mov dword [esp + 0x15c], ebp
mov esi, ebx
sub ebx, eax
mov dword [esp + 0x30], ebx
mov edi, ebx
neg ebx
sar ebx, 0x1f
and eax, ebx
add eax, ebp
mov dword [esp + 0x158], eax
cmp ecx, 0x10
jne 0x585d63
mov ebx, dword [esp + 0x188]
jmp 0x585d95
jne 0x585d6e
mov ebx, dword [esp + 0x188]
jmp 0x585d95
mov ebx, dword [esp + 0x188]
cmp ebx, eax
je 0x585d95
nop
lea esi, [ebx + ecx - 0x11]
cmp esi, eax
jb 0x585d95
mov esi, dword [esp + 0x158]
lea edx, [esi + ecx - 0x11]
cmp edx, ebx
jae 0x585eaf
lea eax, [esp + 0x60]
mov dword [esp], eax
mov eax, dword [esp + 0x160]
mov dword [esp + 4], eax
mov dword [esp + 8], 0x10
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], eax
call fcn.00583d10
movzx eax, byte [esp + 0x10]
test al, al
jne 0x585e2a
mov eax, dword [esp + 0x18c]
cmp eax, 0x10
je 0x585de8
mov eax, dword [esp + 0x158]
mov dword [esp], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
call fcn.00463890
mov eax, dword [0x8e6ca8]
mov ecx, dword [0x8e6cac]
mov dword [esp + 0x1a0], 0
mov dword [esp + 0x1a4], 0
mov dword [esp + 0x1a8], 0
mov dword [esp + 0x1ac], eax
mov dword [esp + 0x1b0], ecx
add esp, 0x168
ret
mov eax, dword [esp + 0x164]
mov dword [esp], eax
mov eax, dword [esp + 0x158]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x188]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x190]
mov dword [esp + 0x18], eax
call fcn.00582b90
mov eax, dword [esp + 0x15c]
mov dword [esp + 0x1a0], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1a4], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x1a8], eax
mov dword [esp + 0x1ac], 0
mov dword [esp + 0x1b0], 0
add esp, 0x168
ret
lea eax, [0x696a40]
mov dword [esp], eax
lea eax, [0x750d8c]
mov dword [esp + 4], eax
call fcn.00436fc0
mov ecx, edx
call fcn.004631b0
mov ecx, edx
mov edx, ebx
call fcn.00463190
lea eax, [0x696a40]
mov dword [esp], eax
lea eax, [0x750d94]
mov dword [esp + 4], eax
call fcn.00436fc0
call fcn.004631b0
nop
call fcn.00461cc0
jmp fcn.005858e0