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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa0
mov dword [esp + 0x34], edx
mov eax, dword [0xbcbae0]
xor eax, ebp
mov dword [esp + 0x98], eax
mov word [esp + 0x46], 0xffff
mov dword [esp + 0x20], ecx
mov edx, dword [ecx + 0xc]
mov esi, dword [ecx]
movzx eax, byte [edx + 0x10]
mov ebx, dword [esi + 4]
lea edi, [eax + eax*8]
mov dword [esp + 8], ebx
mov eax, dword [ebx + edi*8 + 0x4c]
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
test eax, eax
mov eax, dword [ecx + 4]
mov ecx, dword [ebx + edi*8 + 0x18]
mov dword [esp + 0x2c], eax
mov eax, ebx
mov dword [esp + 0x10], ecx
jne 0x81909d
cmp byte [ecx + 0x24], 0
jns 0x819016
mov ebx, dword [ecx + 8]
mov dword [esp + 4], ebx
jmp 0x81909d
lea edi, [esp + 0x48]
xor eax, eax
mov ecx, 0x12
mov dword [esp + 4], edi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x46]
mov dword [esp + 0x7a], 0x10001
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x94]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x50], eax
mov byte [esp + 0x7e], 5
mov dword [esp + 0x54], ecx
movzx eax, word [ecx + 0x30]
mov word [esp + 0x78], ax
mov dword [esp + 0x80], 3
movzx eax, word [ecx + 0x2e]
mov word [esp + 0x94], ax
mov eax, dword [esp + 8]
mov word [esp + 0x96], 0
test byte [eax + edi*8 + 0x30], 1
jne 0x81909d
mov eax, dword [esp + 8]
lea eax, [eax + edi*8 + 0x18]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x24], esi
movzx esi, word [ecx + 0x2e]
lea eax, [eax + edi*8 + 8]
mov dword [esp + 0x14], edx
mov dword [esp + 0x28], eax
movsx ecx, si
call fcn.0081aed0
mov ecx, dword [esp + 0x20]
xor edi, edi
mov ebx, eax
cmp dword [ecx + 0x10], 0
je 0x8190d0
mov edx, dword [esp + 4]
jmp 0x819253
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 4]
test byte [eax + 0x28], 0x20
jne 0x819253
mov eax, dword [eax]
mov eax, dword [eax]
cmp word [eax + 0x20], 0
jns 0x819253
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x44], 0
jne 0x819253
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov eax, dword [ecx + eax*8 + 0x30]
test al, 1
jne 0x819253
test al, 0x28
jne 0x819253
mov eax, dword [esp + 0x10]
mov al, byte [eax + 0x24]
test al, al
js 0x819253
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], ebx
mov eax, dword [eax + 0xc]
test eax, eax
jle 0x819253
mov ecx, dword [esp + 0x2c]
lea eax, [eax + eax*2]
shl eax, 4
mov ecx, dword [ecx + 0x14]
add eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
lea ecx, [eax + esi]
lea edi, [eax + esi - 0xa]
lea eax, [eax + esi + 0x1c]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], eax
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esi + 0xc]
mov edi, 0
and ecx, dword [ebx + 0x24]
and eax, dword [ebx + 0x20]
or eax, ecx
jne 0x81923e
mov edx, dword [esp + 0x28]
mov ecx, ebx
push 0
push 0
call fcn.0081aef0
mov edx, dword [esp + 0xc]
add esp, 8
test eax, eax
mov edi, 0
je 0x81923e
mov word [esi + 0x18], 1
mov dword [esi + 0x20], 0
mov dword [esi + 0x28], 1
mov eax, dword [esi + 0x30]
mov dword [eax], ebx
mov eax, dword [esp + 0x40]
mov word [esi + 0x12], ax
mov eax, dword [esp + 0x10]
cmp dword [eax + 0xc], 0
jne 0x8191e8
test byte [eax + 0x24], 2
mov eax, dword [esp + 0x38]
je 0x8191ec
mov eax, dword [esp + 0x3c]
test ax, ax
mov ecx, 0
mov edx, 0x2b
cmovs eax, ecx
movsx ecx, word [esp + 0x18]
mov word [esi + 0x12], ax
mov word [esi + 0x16], 0x2b
call fcn.00810830
mov word [esi + 0x14], ax
mov dword [esi + 0x24], 0x4000
mov edx, esi
mov ecx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x20]
or ecx, dword [ebp + 8]
or eax, dword [esp + 0x34]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x20]
mov dword [esi], eax
call fcn.0081a980
mov edx, dword [esp + 4]
mov edi, eax
add ebx, 0x30
cmp ebx, dword [esp + 0x30]
mov dword [esp + 0x1c], ebx
jae 0x819253
test edi, edi
je 0x819173
test edx, edx
je 0x819580
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x28]
test edi, edi
jne 0x819580
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov dword [esp + 0x1c], 1
lea eax, [ecx + eax*8 + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0x24]
test eax, eax
je 0x8192b5
mov ecx, dword [esp + 0xc]
mov edi, edx
mov edx, dword [ecx]
mov ecx, dword [ecx + 8]
shr edx, 5
and edx, 1
push eax
push dword [esp + 0x30]
call fcn.0081af60
mov edx, edi
add esp, 8
test eax, eax
jne 0x8192b5
xor edi, edi
jmp 0x819567
xor edi, edi
test byte [edx + 0x39], 1
jne 0x819567
mov eax, dword [edx + 8]
mov edi, edx
movzx ecx, word [eax]
mov eax, dword [ebp + 8]
mov dword [esi + 0x18], 0
mov word [esi + 0x1c], 0
mov dword [esi + 0x28], 0
mov byte [esi + 0x11], 0
mov word [esi + 0x12], 0
mov dword [esi + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], ecx
mov dword [esi], eax
mov word [esi + 0x16], cx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
mov dword [esi + 0x20], edx
push dword [eax + 8]
call fcn.0081b010
add esp, 4
mov ecx, dword [edi + 0x38]
mov dword [esp + 4], edi
mov edx, ecx
and edx, 3
cmp edx, 3
jne 0x819377
test eax, eax
mov dword [esi + 0x24], 0x100
jne 0x819331
xor eax, eax
jmp 0x819335
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov byte [esi + 0x11], al
mov edx, esi
lea eax, [ebx + 0x10]
mov word [esi + 0x14], ax
movsx eax, bx
push eax
call fcn.0081b110
add esp, 4
mov ecx, dword [esp + 0x20]
mov edx, esi
call fcn.0081a980
mov word [esi + 0x16], bx
mov ebx, dword [esp + 0x28]
test eax, eax
je 0x819532
mov edi, eax
jmp 0x819580
test cl, 0x20
je 0x819387
xor edi, edi
mov edx, 0x240
xor ecx, ecx
jmp 0x8193ae
mov edx, dword [esp + 4]
mov edi, dword [edx + 0x40]
mov ecx, dword [edx + 0x44]
mov edx, dword [esp + 0xc]
and edi, dword [edx + 0x14]
and ecx, dword [edx + 0x18]
xor edx, edx
mov esi, edi
or esi, ecx
mov esi, dword [esp + 0x14]
sete dl
or edx, 8
shl edx, 6
test eax, eax
mov dword [esi + 0x24], edx
jne 0x819425
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x24], 0
js 0x819425
mov edx, dword [esp + 4]
cmp dword [edx + 0x24], 0
jne 0x819425
mov edx, edi
or edx, ecx
jne 0x819532
mov edx, dword [esp + 4]
test byte [edx + 0x38], 4
jne 0x819532
mov edx, dword [esp + 4]
mov esi, dword [esp + 0x10]
movzx edx, word [edx + 0x30]
cmp dx, word [esi + 0x30]
jge 0x819532
mov edx, dword [esp + 0x24]
test byte [edx + 0x28], 4
jne 0x819532
mov dl, byte [0xbab997]
test dl, dl
je 0x819532
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
mov edx, dword [edx]
test byte [edx + 0x4c], 0x20
jne 0x819532
mov dword [esp + 8], ecx
movzx ecx, word [esp + 0x18]
test eax, eax
je 0x819438
mov eax, dword [esp + 0x1c]
jmp 0x81943a
xor eax, eax
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x10]
mov byte [esi + 0x11], al
movsx eax, word [edx + 0x30]
movsx ebx, word [ebx + 0x30]
lea eax, [eax + eax*4]
lea eax, [eax + eax*2]
cdq
idiv ebx
or edi, dword [esp + 8]
lea ecx, [ecx + eax + 1]
mov word [esi + 0x14], cx
je 0x819501
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
cmp dword [edi + 0x5c], 0
lea edx, [eax + 0x10]
jle 0x8194f2
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x24]
xor edi, edi
mov eax, dword [eax + 8]
mov dword [esp + 0x30], eax
mov ebx, dword [ecx + 0x64]
lea esi, [edi + edi*2]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x30]
shl esi, 4
mov ecx, dword [ebx + esi]
push dword [esp + 4]
call fcn.0081b280
add esp, 4
test eax, eax
jne 0x8194b8
mov eax, dword [esp + 8]
jmp 0x8194e8
movzx eax, word [ebx + esi + 8]
test ax, ax
jle 0x8194d8
movzx eax, byte [ebx + esi + 0xc]
and al, 0x82
cmp al, 1
mov eax, 0
sbb ax, ax
or eax, 0xffec
mov ecx, dword [esp + 0x24]
add eax, dword [esp + 8]
inc edi
cmp edi, dword [ecx + 0x5c]
mov edx, eax
jl 0x81948e
mov esi, dword [esp + 0x14]
mov edx, eax
movzx ecx, word [esi + 0x14]
movsx ecx, cx
movsx edx, dx
call fcn.00810830
mov word [esi + 0x14], ax
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov edx, esi
movsx eax, bx
push eax
call fcn.0081b110
add esp, 4
mov ecx, dword [esp + 0x20]
mov edx, esi
call fcn.0081a980
mov word [esi + 0x16], bx
mov ebx, dword [esp + 0x28]
test eax, eax
je 0x819532
mov edi, eax
jmp 0x819580
mov esi, dword [esp + 0x20]
mov edx, ebx
mov dword [esi + 0x14], 0
mov ecx, esi
push 0
push dword [esp + 8]
call fcn.0081b300
add esp, 8
cmp dword [esi + 0x14], 1
mov edi, eax
jne 0x81955f
mov eax, dword [esp + 0x10]
or byte [eax + 0x25], 1
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 4]
cmp dword [ebx + 0x44], 0
jne 0x819580
test edi, edi
jne 0x819580
mov edx, dword [edx + 0x14]
inc dword [esp + 0x1c]
test edx, edx
jne 0x819283
mov ecx, dword [esp + 0x98]
xor ecx, ebp
call fcn.00980459
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret