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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x85f581
sub esp, 0x60
call fcn.0085edb0
lea eax, [0x96b520]
mov dword [esp], eax
call fcn.0040ae10
mov eax, dword [esp + 4]
mov dword [esp + 0x30], eax
lea ecx, [0x90cb20]
mov dword [esp], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x68]
mov dword [esp + 8], edx
call fcn.00408a50
movzx eax, byte [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
test al, al
je 0x85f478
mov ebx, dword [esp + 0x30]
mov dword [ebx], ecx
mov ecx, dword [0xdd7ec0]
test ecx, ecx
jne 0x85f469
mov dword [ebx + 4], edx
lea eax, [0x8d7b20]
mov dword [esp], eax
call fcn.0040ae10
mov eax, dword [0xdd7ec0]
mov ecx, dword [esp + 4]
test eax, eax
jne 0x85f456
mov eax, dword [esp + 0x30]
mov dword [eax + 0x40], ecx
lea eax, [0x8d4b20]
mov dword [esp], eax
call fcn.0040ae10
mov eax, dword [0xdd7ec0]
mov ecx, dword [esp + 4]
test eax, eax
jne 0x85f435
mov ebx, dword [esp + 0x30]
mov dword [ebx + 0x44], ecx
lea ecx, [0x9b22e8]
mov dword [ebx + 0x60], ecx
lea edi, [ebx + 0x48]
mov ecx, dword [0xdd7ec0]
mov ebp, dword [ebx + 0x50]
mov dword [esp + 0x1c], ebp
mov esi, dword [ebx + 0x4c]
mov ebp, dword [ebx + 0x48]
mov edx, esi
lea esi, [ebx + 0x48]
mov dword [esp + 0x2c], esi
test ecx, ecx
jne 0x85f3ff
xor eax, eax
call fcn.004572aa
mov dword [ebx + 0x48], ebp
mov dword [ebx + 0x4c], edx
mov ebp, dword [esp + 0x1c]
mov dword [ebx + 0x50], ebp
cmp ebp, 0x8000
jl 0x85f3ac
mov edx, dword [ebx + 0x50]
cmp edx, 0x8000
jb 0x85f576
mov dword [ebx + 0x4c], 0x8000
mov edx, dword [ebx + 0x48]
mov ecx, dword [esp + 0x70]
cmp ecx, 0x8000
jle 0x85f3a6
lea eax, [ecx - 0x8000]
cmp eax, ecx
ja 0x85f571
sub ecx, eax
mov ebp, dword [esp + 0x74]
sub ebp, eax
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and eax, ebp
mov ebp, dword [esp + 0x6c]
add eax, ebp
cmp ecx, 0x8000
jge 0x85f39f
mov dword [esp + 0x1c], ecx
cmp edx, eax
je 0x85f36c
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.004579b0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x54], eax
cmp dword [ecx + 0x4c], eax
jne 0x85f387
mov dword [ecx + 0x54], 0
mov byte [ecx + 0x5c], 1
mov eax, dword [ecx + 0x54]
mov dword [ecx + 0x58], eax
lea eax, [0xa516c0]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
add esp, 0x60
ret
mov ecx, 0x8000
jmp 0x85f354
mov eax, dword [esp + 0x6c]
jmp 0x85f34c
lea eax, [0x8ebd00]
mov dword [esp], eax
mov dword [esp + 4], 0x8000
mov dword [esp + 8], 0x8000
call fcn.00440500
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x4c], 0x8000
mov dword [ecx + 0x50], 0x8000
mov edx, dword [0xdd7ec0]
test edx, edx
jne 0x85f3f4
mov dword [ecx + 0x48], eax
mov ebx, ecx
jmp 0x85f2fc
mov edi, dword [esp + 0x2c]
call fcn.00456fe0
jmp 0x85f3ed
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], ebp
lea eax, [0x934700]
mov dword [esp], eax
mov dword [esp + 4], edi
call fcn.004112f0
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
call fcn.00456fe0
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
mov esi, edi
jmp 0x85f2e6
mov ebx, dword [esp + 0x30]
lea edi, [ebx + 0x44]
mov eax, ecx
call fcn.00456fe0
lea edi, [ebx + 0x60]
lea eax, [0x9b22e8]
call fcn.00456fe0
jmp 0x85f2b5
mov edx, dword [esp + 0x30]
lea edi, [edx + 0x40]
mov eax, ecx
call fcn.00456fe0
jmp 0x85f285
lea edi, [ebx + 4]
mov eax, edx
call fcn.00456fe0
jmp 0x85f25e
mov ecx, dword [esp + 0x64]
lea edx, [0xa4d580]
cmp ecx, edx
jne 0x85f567
mov eax, dword [esp + 0x68]
jne 0x85f4a6
cmp dword [eax + 4], 0x1000
jl 0x85f4a6
mov edx, eax
lea ecx, [0xa51280]
jmp 0x85f247
lea eax, [0x94b580]
mov dword [esp], eax
call fcn.0040ae10
mov eax, dword [esp + 4]
mov dword [esp + 0x20], eax
lea ecx, [0x8ebd00]
mov dword [esp], ecx
mov dword [esp + 4], 0x1000
mov dword [esp + 8], 0x1000
call fcn.00440500
mov eax, dword [esp + 0xc]
mov dword [esp + 0x24], eax
lea edi, [esp + 0x34]
xor eax, eax
call fcn.004572a5
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], 0x1000
mov dword [esp + 0x3c], 0x1000
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x5c], 0xffffffff
mov ecx, dword [0xdd7ec0]
test ecx, ecx
jne 0x85f545
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x34]
call fcn.00457752
mov eax, dword [esp + 0x20]
jmp 0x85f499
lea eax, [0x94b580]
mov dword [esp], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
lea ecx, [esp + 0x34]
mov dword [esp + 8], ecx
call fcn.00410ec0
xor eax, eax
jmp 0x85f53c
mov eax, 0
jmp 0x85f48e
call fcn.004570c0
mov ecx, 0x8000
call fcn.004570a0
nop
call fcn.004557a0
jmp fcn.0085f1e0