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

Disassembly:
sub esp, 0x84
mov eax, dword [0x5bc9cc]
xor eax, esp
mov dword [esp + 0x7c], eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x110]
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x14], edi
jne 0x4085de
xor eax, eax
jmp 0x408848
cmp dword [edi + 0x104], ebx
mov dword [edi + 0x114], ebx
mov dword [esp + 0x18], ebx
je 0x4085d7
push 0x68
lea eax, [esp + 0x24]
push ebx
push eax
call fcn.0052d8f0
push 0x38
push ebx
push esi
call fcn.0052d8f0
add esp, 0x18
xor esi, esi
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x408624
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0x110]
mov edx, dword [esi + 0x5c0690]
mov dword [eax + ecx], edx
mov eax, 0x5c0c40
mov dword [esp + 0x10], eax
movzx edi, word [eax]
cmp di, 0x20
je 0x4087cc
push 0x68
lea eax, [esp + 0x24]
push 0
push eax
call fcn.0052d8f0
mov edx, dword [0x5702ac]
mov eax, dword [0x5702b0]
mov ecx, dword [0x5702a8]
mov ebx, dword [0x5702bc]
mov ebp, dword [0x5702c0]
mov dword [esp + 0x40], edx
mov edx, dword [0x5702c4]
mov dword [esp + 0x44], eax
mov eax, dword [0x5702c8]
mov dword [esp + 0x58], edx
mov edx, dword [0x5702cc]
mov dword [esp + 0x5c], eax
mov eax, dword [0x5702d0]
mov dword [esp + 0x60], edx
mov edx, dword [0x5702d4]
mov dword [esp + 0x64], eax
mov ax, word [esi + 0x5c0694]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x1c]
mov word [esp + 0x6e], ax
mov eax, dword [edx - 4]
mov dword [esp + 0x70], eax
mov ax, di
mov dword [esp + 0x3c], ecx
mov ecx, dword [0x5702b4]
mov word [esp + 0x7a], ax
mov edx, dword [esp + 0x7a]
mov dword [esp + 0x48], ecx
mov ecx, dword [0x5702b8]
add edx, 0xffffffef
add esp, 0xc
cmp dx, 0xf
mov dword [esp + 0x20], 0x52
mov dword [esp + 0x28], 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebp
mov word [esp + 0x60], 0xfffe
ja 0x40871b
mov ax, 0x20
mov word [esp + 0x6e], ax
movzx edx, word [esp + 0x62]
movzx eax, ax
imul eax, edx
cdq
and edx, 7
add eax, edx
mov edx, dword [esi + 0x5c0698]
sar eax, 3
mov word [esp + 0x6c], ax
movzx eax, ax
imul eax, dword [esp + 0x64]
mov dword [esp + 0x68], eax
mov eax, dword [0x5702c4]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x84], eax
mov eax, dword [ecx + 0x104]
lea ecx, [esp + 0x18]
push ecx
push 0x68
mov dword [esp + 0x7c], edx
lea ecx, [esp + 0x28]
mov word [esp + 0x78], 0x16
mov word [esp + 0x7a], di
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebp
mov dword [esp + 0x20], 0
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ecx
push eax
call edx
test eax, eax
jl 0x4087cc
cmp dword [esp + 0x18], 0
je 0x4087cc
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x110]
mov edx, dword [esp + 0x1c]
lea ecx, [edx + ecx + 4]
mov edx, dword [esp + 0x10]
mov edx, dword [edx - 8]
or dword [ecx], edx
mov ecx, dword [esi + 0x5c0690]
or dword [eax + 0x114], ecx
mov eax, dword [esp + 0x10]
add eax, 0x14
cmp eax, 0x5c0e70
mov dword [esp + 0x10], eax
jl 0x40863c
mov eax, dword [esp + 0x1c]
add eax, 8
add esi, 0x14
cmp eax, 0x38
mov dword [esp + 0x1c], eax
jl 0x408620
mov edx, dword [esp + 0x14]
test byte [edx + 0x114], 0x20
je 0x408843
call fcn.0050f6dd
test eax, eax
je 0x408843
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
test eax, eax
je 0x408843
mov ecx, dword [eax + 0x5c]
test ecx, ecx
je 0x408843
add dword [ecx + 0x184c], 1
or dword [ecx + 4], 0x200
add dword [ecx + 0x184c], 0xffffffff
jne 0x408843
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov eax, 1
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052944d
add esp, 0x84
ret