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

Disassembly:
sub esp, 0x8c
push ebx
mov ebx, dword [esp + 0x94]
mov eax, dword [ebx + 0x60]
test eax, eax
push ebp
push esi
push edi
mov edi, dword [esp + 0xa4]
mov ebp, dword [edi + 0x38]
je 0x808918
mov eax, dword [ebp + 8]
lea eax, [eax + eax*2]
shl eax, 3
push eax
mov dword [esp + 0x18], 0
call fcn.0083d822
mov esi, eax
add esp, 4
test esi, esi
je 0x808997
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov dword [esp + 0x10], ecx
call dword [edx + 0x14c]
cmp eax, 0x400
jbe 0x808738
mov eax, 0x400
jmp 0x808744
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0x14c]
cmp dword [ebp], eax
jae 0x80879e
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov dword [esp + 0x10], ecx
call dword [edx + 0x148]
cmp eax, 0x10
jbe 0x808763
mov eax, 0x10
jmp 0x80876f
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0x148]
cmp dword [ebp + 8], eax
ja 0x80879e
mov eax, dword [ebx + 0x78]
test eax, eax
jne 0x80879e
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov word [esp + 0x26], 0x23
mov cx, word [ebp + 8]
mov word [esp + 0x24], cx
mov dword [esp + 0x3c], esi
jmp 0x808808
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [ebx + 0x60], 0
mov dword [esp + 0x20], edx
xor ecx, ecx
mov eax, 1
mov dword [ebx + 0x78], eax
mov edx, dword [edi + 0x30]
mov dword [esp + 0x14], eax
mov ax, word [ebp + 8]
mov word [esp + 0x18], ax
mov dword [esp + 0x1c], esi
mov byte [esp + 0x1b], 1
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], ecx
mov dword [edx + 0x1c], ecx
mov eax, dword [edi + 0x30]
mov word [eax], 9
mov ecx, dword [edi + 0x30]
mov eax, 4
mov word [ecx + 2], ax
add dword [edi + 0x30], 0x20
add dword [ebx + 0x58], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 0x10], 0
jbe 0x808918
xor ebx, ebx
jmp 0x808822
mov edx, dword [ebp + 0x18]
mov edi, dword [ebx + edx]
mov word [esi + 6], 0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc8]
mov cl, byte [eax]
mov byte [esi + 1], cl
mov edx, dword [ebp + 0x18]
mov ax, word [ebx + edx + 0xc]
mov word [esi + 8], ax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebx + ecx + 4]
mov dword [esi + 0xc], edx
test byte [edi + 0x50], 0x10
je 0x80888c
mov eax, dword [ebp + 0x18]
mov cl, byte [ebx + eax + 0x10]
mov eax, dword [esp + 0xa0]
mov dl, byte [esi + 8]
test cl, 1
setne cl
add cl, 0xf
mov byte [esi], cl
sub dl, byte [eax + 0x124]
mov byte [esi + 3], dl
mov word [esi + 6], 0x20
mov word [esi + 8], 0
jmp 0x8088cc
mov ecx, dword [ebp + 0x18]
test byte [ebx + ecx + 0x10], 1
setne dl
inc dl
mov byte [esi], dl
test byte [edi + 0x50], 0x40
jne 0x8088cc
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x50]
cmp eax, 0xfe
je 0x8088bd
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x50]
cmp eax, 0xfd
jne 0x8088cc
mov eax, dword [ebp + 0x18]
cmp word [ebx + eax + 0xc], 4
jbe 0x8088cc
or byte [esi + 6], 1
test byte [edi + 0x50], 1
jne 0x8088f7
mov cl, byte [edi + 0x52]
mov eax, dword [esp + 0xa0]
mov byte [esi + 2], cl
mov ecx, dword [eax + 0x44]
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x14]
sub edx, ecx
test eax, eax
mov dword [esi + 0x10], edx
jne 0x8088f7
or byte [esp + 0x27], 8
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
inc eax
add ebx, 0x18
add esi, 0x18
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x808822
mov ebx, dword [esp + 0xa0]
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0x5c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xa8]
and eax, 0x108
cmp eax, 0x100
jne 0x808943
or eax, 0xffffffff
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov ecx, dword [esp + 0xa4]
mov eax, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x30]
push 4
lea edx, [esp + 0x60]
push edx
lea edx, [esp + 0x20]
push edx
mov edx, dword [ebx + 0x78]
push edx
push eax
sub ecx, eax
mov eax, dword [ebx + 0x60]
sar ecx, 5
push ecx
mov ecx, dword [ebx + 0x1a8]
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
call fcn.0086f552
add esp, 0x24
test eax, eax
je 0x8089a7
mov ecx, dword [ebx]
mov edx, dword [ecx]
push 0
push eax
call dword [edx + 0x14]
mov dword [ebx + 0x104], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x8c
ret
push 0x75d7f8
call dword [fcn.005df108]
pop edi
pop esi
pop ebp
mov dword [ebx + 0x100], 1
xor eax, eax
pop ebx
add esp, 0x8c
ret