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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [ebp + 0xc], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x541e8]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x541ec]
lea esi, [edi + 0x68]
lea ebx, [edi + 0x1c]
mov dword [ebp - 8], esi
mov dword [ebp - 4], eax
je 0x80673b
push esi
call fcn.00806624
mov eax, dword [edi + 0x34]
mov dword [esi], eax
mov eax, dword [edi + 0x48]
push ebx
mov dword [esi + 0x84], eax
call fcn.007df920
cmp eax, 0x7fffffff
pop ecx
pop ecx
mov dword [esi + 4], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
push ebx
call fcn.007df920
cmp eax, 9
pop ecx
mov dword [esi + 8], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp eax, 4
jle 0x8066ea
add eax, 0xfffffffb
mov dword [esi + 8], eax
push ebx
call fcn.007df920
cmp eax, 0xff
pop ecx
mov dword [esi + 0xc], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp dword [edi + 0x38], 5
je 0x806717
cmp dword [edi + 0x38], 0x15
je 0x806717
xor eax, eax
jmp 0x80671a
xor eax, eax
inc eax
mov dword [esi + 0x64], eax
cmp dword [edi + 0x38], 0x14
je 0x80672d
cmp dword [edi + 0x38], 0x15
je 0x80672d
xor eax, eax
jmp 0x806730
xor eax, eax
inc eax
mov dword [esi + 0x80], eax
jmp 0x806bfc
mov edi, dword [ebp - 0xc]
mov eax, dword [edi + 0x42c]
add eax, 4
push eax
push ebx
call fcn.007df770
pop ecx
mov dword [esi + 0x10], eax
cmp dword [edi + 0x4a8], 0
pop ecx
jne 0x8067e1
mov eax, dword [ebx + 0xc]
test eax, eax
jl 0x80678c
mov eax, dword [ebx + 4]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
shl ecx, 8
or edx, ecx
mov ecx, dword [ebx + 0xc]
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
mov eax, ecx
or dword [ebx + 0x10], edx
add eax, 0xfffffff0
mov dword [ebx + 0xc], eax
mov ecx, dword [ebx + 0x10]
mov eax, ecx
shr eax, 0x1f
add ecx, ecx
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x14], eax
test eax, eax
je 0x8067e1
cmp dword [ebx + 0xc], 0
jl 0x8067ce
mov eax, dword [ebx + 4]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
shl ecx, 8
or edx, ecx
mov ecx, dword [ebx + 0xc]
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
mov eax, ecx
or dword [ebx + 0x10], edx
add eax, 0xfffffff0
mov dword [ebx + 0xc], eax
mov ecx, dword [ebx + 0x10]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x18], eax
or dword [esi + 0x1c], 0xffffffff
cmp dword [esi + 0x64], 0
je 0x806808
push ebx
call fcn.007df920
cmp eax, 0xffff
pop ecx
mov dword [esi + 0x1c], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp dword [edi + 0x430], 0
jne 0x80683f
mov eax, dword [edi + 0x434]
add eax, 4
push eax
push ebx
call fcn.007df770
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
pop ecx
pop ecx
je 0x80683f
cmp dword [esi + 0x14], 0
jne 0x80683f
push ebx
call fcn.007df810
pop ecx
mov dword [esi + 0x24], eax
cmp dword [edi + 0x430], 1
jne 0x806874
cmp dword [edi + 0x438], 0
jne 0x806874
push ebx
call fcn.007dfa20
mov dword [esi + 0x28], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
pop ecx
je 0x806874
cmp dword [esi + 0x14], 0
jne 0x806874
push ebx
call fcn.007dfa20
pop ecx
mov dword [esi + 0x2c], eax
mov edi, dword [ebp - 4]
cmp dword [edi + 0x48], 0
je 0x806898
push ebx
call fcn.007df920
cmp eax, 0x7f
pop ecx
mov dword [esi + 0x30], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp dword [esi + 8], 1
jne 0x8068db
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jl 0x8068c8
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
mov edi, dword [ebp - 4]
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x34], eax
mov eax, dword [edi + 0x20]
mov dword [esi + 0x3c], eax
mov eax, dword [edi + 0x24]
mov dword [esi + 0x40], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x8068f7
cmp eax, 1
jne 0x8069ad
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jl 0x80691e
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
shr eax, 0x1f
add ecx, ecx
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x38], eax
test eax, eax
je 0x80697c
mov edi, dword [esi + 0x14]
neg edi
sbb edi, edi
and edi, 0x10
push ebx
add edi, 0xf
call fcn.007df920
cmp eax, edi
pop ecx
mov dword [esi + 0x3c], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp dword [esi + 8], 1
jne 0x80697c
push ebx
call fcn.007df920
cmp eax, edi
pop ecx
mov dword [esi + 0x40], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x541e8]
mov ecx, dword [eax + 0x42c]
xor eax, eax
add ecx, 4
inc eax
shl eax, cl
mov edi, esi
mov ecx, dword [edi + 0x14]
mov esi, ebx
shl eax, cl
push eax
call fcn.0080622c
pop ecx
test eax, eax
je 0x806ba9
mov esi, edi
mov eax, dword [ebp - 4]
xor ecx, ecx
cmp dword [eax + 0x28], ecx
je 0x8069bc
cmp dword [esi + 8], ecx
je 0x8069d0
cmp dword [eax + 0x2c], 1
jne 0x806a6d
cmp dword [esi + 8], 1
jne 0x806a6d
push dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov esi, ebx
call fcn.0080635b
pop ecx
test eax, eax
je 0x806ba9
mov esi, edi
cmp dword [esi], 0
je 0x806ace
cmp dword [esi + 0x64], 0
mov ecx, dword [ebx + 0xc]
je 0x806a75
test ecx, ecx
jl 0x806a1e
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x68], eax
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jl 0x806a58
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x6c], eax
jmp 0x806ace
mov dword [esi + 0x78], ecx
jmp 0x8069e8
test ecx, ecx
jl 0x806a99
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
shr eax, 0x1f
add ecx, ecx
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x70], eax
test eax, eax
je 0x806ace
mov eax, dword [ebp - 8]
lea edi, [eax + 0x3c0]
lea esi, [eax + 0x7c]
push ebx
call fcn.00806590
pop ecx
test eax, eax
je 0x806ba9
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
cmp dword [edi + 4], 0
je 0x806aff
mov eax, dword [esi + 8]
cmp eax, 2
je 0x806aff
cmp eax, 4
je 0x806aff
push ebx
call fcn.007df920
cmp eax, 2
pop ecx
mov dword [esi + 0x44], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
push ebx
call fcn.007df810
mov dword [esi + 0x48], eax
mov eax, dword [esi + 8]
pop ecx
cmp eax, 3
je 0x806b1b
cmp eax, 4
jne 0x806b62
cmp eax, 3
jne 0x806b58
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jl 0x806b45
mov eax, dword [ebx + 4]
movzx edi, byte [eax]
movzx edx, byte [eax + 1]
shl edi, 8
or edx, edi
mov edi, dword [ebp - 4]
shl edx, cl
add eax, 2
mov dword [ebx + 4], eax
or dword [ebx + 0x10], edx
add ecx, 0xfffffff0
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov dword [esi + 0x4c], eax
push ebx
call fcn.007df810
pop ecx
mov dword [esi + 0x50], eax
xor eax, eax
cmp dword [edi + 0x40], eax
je 0x806bad
push ebx
call fcn.007df920
cmp eax, 2
pop ecx
mov dword [esi + 0x54], eax
jg 0x806ba9
test eax, eax
jl 0x806ba9
cmp eax, 1
je 0x806bb6
push ebx
call fcn.007df810
cmp eax, 6
pop ecx
mov dword [esi + 0x58], eax
jg 0x806ba9
cmp eax, 0xfffffffa
jl 0x806ba9
push ebx
call fcn.007df810
cmp eax, 6
pop ecx
mov dword [esi + 0x5c], eax
jg 0x806ba9
cmp eax, 0xfffffffa
jge 0x806bb6
xor eax, eax
jmp 0x806bff
mov dword [esi + 0x54], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x58], eax
cmp dword [edi + 0xc], 0
jle 0x806bfc
mov eax, dword [edi + 0x10]
cmp eax, 3
jl 0x806bfc
cmp eax, 5
jg 0x806bfc
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x4a4]
mov ecx, dword [ecx + 0x4a0]
inc eax
inc ecx
imul eax, ecx
mov ecx, dword [edi + 0x18]
inc ecx
cdq
idiv ecx
test edx, edx
je 0x806be9
inc eax
push eax
call fcn.00806614
push eax
push ebx
call fcn.007df770
add esp, 0xc
mov dword [esi + 0x60], eax
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret