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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push ebx
mov dword [ebp - 4], 0
call fcn.01065550
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x1065ac1
mov dword [ebp - 4], 0x80070057
mov eax, dword [ebp - 4]
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp + 0xc]
push esi
push edi
test ecx, ecx
jne 0x1065ade
cmp dword [eax + 0x18], ecx
je 0x1065c7c
mov esi, dword [eax + 0x1c]
mov edx, dword [eax + 0x28]
mov edi, dword [eax + 0x20]
jmp 0x1065af3
cmp dword [eax + 0x18], 1
je 0x1065c7c
mov esi, dword [ecx + 4]
movzx edx, word [ecx + 0x12]
movzx edi, word [ecx + 2]
mov dword [ebp - 0xc], esi
test esi, esi
jle 0x1065c7c
mov ecx, 0x18
sub ecx, edx
mov dword [ebp + 8], ecx
mov dword [ebx + 0x7c], ecx
mov edx, 1
xorps xmm0, xmm0
js 0x1065b25
shl edx, cl
cvtsi2ss xmm0, edx
movss dword [ebx + 0x80], xmm0
jmp 0x1065b41
movss xmm1, dword [0x1002fd4]
neg ecx
shl edx, cl
cvtsi2ss xmm0, edx
divss xmm1, xmm0
movss dword [ebx + 0x80], xmm1
mov eax, dword [eax + 0x2c]
mov dword [ebx + 0x11c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x78], edi
test eax, eax
jne 0x1065b5f
push ebx
call fcn.01065330
jmp 0x1065cfd
cmp dword [eax + 0x3c], 0
jl 0x1065c7c
cmp dword [eax + 0x40], 0
jl 0x1065c7c
cmp dword [eax + 0x50], 0
jl 0x1065c7c
cmp dword [eax + 0x54], 0
jl 0x1065c7c
cmp dword [eax + 0x5c], 0
jl 0x1065c7c
mov ecx, 0x1e
mov esi, eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebx + 0x24], 0
mov dword [ebx + 0x30], 0
jne 0x1065bb3
cmp dword [ebx + 0x28], 0
je 0x1065ca7
mov ecx, eax
mov edx, dword [ecx + 0x30]
test edx, edx
je 0x1065c7c
mov ecx, dword [ebx + 0x34]
cmp ecx, 2
jl 0x1065c7c
fld qword [0x1007148]
fld qword [edx]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jp 0x1065c7c
fldz
mov eax, ecx
add eax, eax
fld qword [edx + eax*8 - 0x10]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jp 0x1065c7c
lea ecx, [ecx + ecx*2]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
call fcn.01046c10
mov dword [ebx + 0x30], eax
test eax, eax
je 0x1066497
mov edx, dword [ebx + 0x34]
add edx, edx
xor ecx, ecx
test edx, edx
jle 0x1065ca7
fldz
mov esi, dword [ebp + 0x14]
xor edx, edx
mov eax, dword [esi + 0x30]
fld qword [eax + ecx*8]
mov edi, dword [ebx + 0x30]
fstp qword [edx + edi]
mov eax, dword [esi + 0x30]
fld qword [eax + ecx*8 + 8]
mov edi, dword [ebx + 0x30]
fstp qword [edi + edx + 8]
mov eax, dword [ebx + 0x34]
lea eax, [eax + eax - 2]
cmp ecx, eax
je 0x1065c8f
mov eax, dword [esi + 0x30]
fld qword [eax + ecx*8 + 0x18]
fsub qword [eax + ecx*8 + 8]
fld qword [eax + ecx*8 + 0x10]
fsub qword [eax + ecx*8]
mov eax, dword [ebx + 0x30]
fdivp st(1)
fstp qword [eax + edx + 0x10]
mov eax, dword [esi + 0x30]
fld qword [eax + ecx*8 + 0x10]
fld qword [eax + ecx*8]
fcompi st(1)
fstp st(0)
jbe 0x1065c96
fstp st(0)
mov dword [ebp - 4], 0x80070057
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebx + 0x30]
fst qword [eax + edx + 0x10]
mov eax, dword [ebx + 0x34]
add ecx, 2
add eax, eax
add edx, 0x18
cmp ecx, eax
jl 0x1065c2a
fstp st(0)
cmp dword [ebx + 0x70], 0
je 0x1065cc2
mov dword [ebx + 0x38], 1
mov dword [ebx + 0x3c], 0x64
mov dword [ebx + 0x40], 0x1f4
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x24], 0
jne 0x1065cdb
cmp dword [eax + 0x28], 0
jne 0x1065cdb
cmp dword [eax + 0x2c], 0
jne 0x1065cdb
xor eax, eax
jmp 0x1065ce0
mov eax, 1
cmp dword [ebx + 0x64], 0
mov dword [ebx + 0x24], eax
je 0x1065cf0
mov dword [ebx + 0x60], 1
cmp dword [ebx + 0x68], 0
jne 0x1065cfd
mov dword [ebx + 0x20], 0
cmp dword [ebx + 0x44], 0
je 0x1065d19
mov eax, dword [ebx + 0x78]
cmp eax, 1
je 0x1065d19
cmp eax, 2
je 0x1065d19
cmp eax, 6
jne 0x1065c7c
cmp dword [ebx + 0x48], 0
je 0x1065d29
cmp dword [ebx + 0x4c], 0
jne 0x1065c7c
mov ecx, dword [ebx + 0x78]
add ecx, ecx
add ecx, ecx
push ecx
call fcn.01046c10
mov dword [ebx + 0x120], eax
test eax, eax
je 0x1066497
mov edx, dword [ebx + 0x78]
add edx, edx
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x124], eax
test eax, eax
je 0x1066497
mov eax, dword [ebx + 0x3c]
mov esi, dword [ebp - 0xc]
test eax, eax
je 0x1065dbc
imul eax, esi
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
and eax, 0xfff
mov edx, eax
mov eax, dword [0x1009958]
shr ecx, 0xc
and ecx, 0x3f
mov edi, dword [eax + ecx*4]
mov eax, dword [eax + ecx*4 + 4]
sub eax, edi
imul eax, edx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, edi
mov ecx, 0x40000000
sub ecx, eax
mov dword [ebx + 0xb0], ecx
jmp 0x1065dc6
mov dword [ebx + 0xb0], 0x40000000
mov eax, dword [ebx + 0xb0]
mov edx, 0x40000000
sub edx, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x40]
mov dword [ebx + 0xb8], edx
test eax, eax
je 0x1065e36
imul eax, esi
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
and eax, 0xfff
mov edx, eax
mov eax, dword [0x1009958]
shr ecx, 0xc
and ecx, 0x3f
mov edi, dword [eax + ecx*4]
mov eax, dword [eax + ecx*4 + 4]
sub eax, edi
imul eax, edx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, edi
mov ecx, 0x40000000
sub ecx, eax
mov dword [ebx + 0xb4], ecx
jmp 0x1065e40
mov dword [ebx + 0xb4], 0x40000000
mov eax, dword [ebx + 0xb4]
mov edx, 0x40000000
sub edx, eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x50]
mov dword [ebx + 0xbc], edx
test eax, eax
je 0x1065eb0
imul eax, esi
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
and eax, 0xfff
mov edx, eax
mov eax, dword [0x1009958]
shr ecx, 0xc
and ecx, 0x3f
mov edi, dword [eax + ecx*4]
mov eax, dword [eax + ecx*4 + 4]
sub eax, edi
imul eax, edx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, edi
mov ecx, 0x40000000
sub ecx, eax
mov dword [ebx + 0x94], ecx
jmp 0x1065eba
mov dword [ebx + 0x94], 0x40000000
mov eax, dword [ebx + 0x54]
mov edx, 0x40000000
sub edx, dword [ebx + 0x94]
mov dword [ebx + 0x9c], edx
test eax, eax
je 0x1065f25
imul eax, esi
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
and eax, 0xfff
mov edx, eax
mov eax, dword [0x1009958]
shr ecx, 0xc
and ecx, 0x3f
mov esi, dword [eax + ecx*4]
mov eax, dword [eax + ecx*4 + 4]
sub eax, esi
imul eax, edx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, esi
mov ecx, 0x40000000
sub ecx, eax
mov dword [ebx + 0x98], ecx
jmp 0x1065f2f
mov dword [ebx + 0x98], 0x40000000
mov edx, 0x40000000
sub edx, dword [ebx + 0x98]
mov eax, 0x40000000
mov dword [ebx + 0xa0], edx
cdq
idiv dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov ecx, 3
mov dword [ebx + 0xa8], eax
mov eax, 0x40000000
cdq
idiv dword [ebp - 0x10]
mov dword [ebx + 0xa4], eax
cmp dword [edi + 4], ecx
jne 0x1065f78
cmp dword [edi + 0x10], 0
jg 0x1065f78
mov dword [ebx + 8], 0
cmp dword [edi], ecx
jne 0x1065f8f
cmp dword [edi + 8], 0
jg 0x1065f8f
mov dword [edi], 1
mov dword [edi + 8], 0
mov eax, dword [ebp + 0x14]
cmp dword [eax + 4], ecx
jne 0x1065faf
cmp dword [eax + 0x10], 0
jg 0x1065faf
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov edx, dword [edi + 0x10]
mov dword [eax + 0x10], edx
mov edx, dword [edi + 0x14]
mov dword [eax + 0x14], edx
cmp dword [eax], ecx
jne 0x1065fc9
cmp dword [eax + 0x18], 0
jg 0x1065fc9
mov ecx, dword [edi]
mov dword [eax], ecx
mov edx, dword [edi + 8]
mov dword [eax + 0x18], edx
mov ecx, dword [edi + 0xc]
mov dword [eax + 0x1c], ecx
cmp dword [ebx + 8], 0
je 0x1066216
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x10]
mov esi, dword [0x1008808]
mov dword [ebp - 0x1c], eax
xor eax, eax
dec ecx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
je 0x1066042
dec ecx
je 0x1066004
dec ecx
je 0x1065fff
mov dword [ebp + 0xc], 0x80070057
jmp 0x1066047
shl edx, 8
jmp 0x1066013
mov ecx, dword [ebp + 8]
cmp ecx, eax
jl 0x106600f
shl edx, cl
jmp 0x1066013
neg ecx
sar edx, cl
mov eax, edx
shr eax, 0xd
and eax, 0x3ff
mov ecx, dword [esi + eax*4]
mov eax, dword [esi + eax*4 + 4]
sub eax, ecx
and edx, 0x1fff
imul eax, edx
cdq
and edx, 0x1fff
add eax, edx
sar eax, 0xd
add eax, ecx
mov dword [ebp + 0x10], eax
jmp 0x1066047
mov eax, edx
mov dword [ebp + 0x10], edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
test eax, eax
js 0x1065c83
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
mov edi, dword [edi]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
xor eax, eax
dec edi
mov dword [ebp - 8], ecx
mov dword [ebp + 0xc], eax
je 0x10660f4
dec edi
je 0x10660b3
dec edi
je 0x1066081
mov ecx, 0x80070057
jmp 0x10660f9
shl edx, 8
mov eax, edx
shr eax, 0xd
and eax, 0x3ff
mov edi, dword [esi + eax*4]
mov eax, dword [esi + eax*4 + 4]
sub eax, edi
and edx, 0x1fff
imul eax, edx
cdq
and edx, 0x1fff
add eax, edx
sar eax, 0xd
add eax, edi
mov dword [ebp + 0xc], eax
jmp 0x10660f9
mov ecx, dword [ebp + 8]
cmp ecx, eax
jl 0x10660be
shl edx, cl
jmp 0x10660c2
neg ecx
sar edx, cl
mov eax, edx
shr eax, 0xd
and eax, 0x3ff
mov ecx, dword [esi + eax*4]
mov eax, dword [esi + eax*4 + 4]
sub eax, ecx
and edx, 0x1fff
imul eax, edx
cdq
and edx, 0x1fff
add eax, edx
sar eax, 0xd
add eax, ecx
mov ecx, dword [ebp - 8]
mov dword [ebp + 0xc], eax
jmp 0x10660f9
mov eax, edx
mov dword [ebp + 0xc], edx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
test ecx, ecx
js 0x1065c83
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
mov ecx, dword [ecx + 4]
xor edi, edi
dec ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], edi
je 0x1066170
dec ecx
je 0x1066132
dec ecx
je 0x106612d
mov dword [ebp - 4], 0x80070057
jmp 0x1066172
shl eax, 8
jmp 0x1066141
mov ecx, dword [ebp + 8]
cmp ecx, edi
jl 0x106613d
shl eax, cl
jmp 0x1066141
neg ecx
sar eax, cl
mov edx, eax
and eax, 0x1fff
shr edx, 0xd
and edx, 0x3ff
mov ecx, dword [esi + edx*4]
mov edi, eax
mov eax, dword [esi + edx*4 + 4]
sub eax, ecx
imul eax, edi
cdq
and edx, 0x1fff
lea edi, [edx + eax]
sar edi, 0xd
add edi, ecx
jmp 0x1066172
mov edi, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], eax
test eax, eax
js 0x1065c83
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x18]
mov ecx, dword [ecx]
mov dword [ebp - 0x1c], eax
xor eax, eax
dec ecx
mov dword [ebp + 0x14], 0
je 0x10661ec
dec ecx
je 0x10661b1
dec ecx
je 0x10661ac
mov dword [ebp + 0x14], 0x80070057
jmp 0x10661ee
shl edx, 8
jmp 0x10661c0
mov ecx, dword [ebp + 8]
cmp ecx, eax
jl 0x10661bc
shl edx, cl
jmp 0x10661c0
neg ecx
sar edx, cl
mov eax, edx
shr eax, 0xd
and eax, 0x3ff
mov ecx, dword [esi + eax*4]
mov eax, dword [esi + eax*4 + 4]
sub eax, ecx
and edx, 0x1fff
imul eax, edx
cdq
and edx, 0x1fff
add eax, edx
sar eax, 0xd
add eax, ecx
jmp 0x10661ee
mov eax, edx
mov edx, dword [ebp + 0x14]
mov ecx, eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], edx
test edx, edx
js 0x1065c83
mov edx, dword [ebp + 0x10]
cmp dword [ebp + 0xc], edx
jl 0x106620d
cmp eax, edi
jge 0x1066219
mov dword [ebx + 8], 0
jmp 0x1066219
mov ecx, dword [ebp - 0x20]
cmp dword [ebx + 0x2c], 0
mov edi, dword [ebp - 0x18]
je 0x1066232
cmp dword [ebx + 8], 0
je 0x10662ed
cmp dword [ebx + 0x68], 0
je 0x106623c
mov dword [ebx + 0x100], 1
cmp dword [ebx + 8], 0
je 0x10662ed
cmp dword [ebx + 0x70], 0
je 0x10662ed
mov edx, dword [ebp - 0x10]
cmp edx, edi
jne 0x106626c
cmp dword [ebp - 8], ecx
jne 0x106626c
xor ecx, ecx
lea esi, [edx + 0xc00000]
test esi, esi
setg cl
dec ecx
and ecx, esi
mov eax, ecx
sub eax, edi
sar eax, 1
add eax, edi
mov esi, edi
sub esi, ecx
sub esi, edx
add esi, dword [ebp - 8]
xor edx, edx
test esi, esi
setle dl
mov dword [ebp - 0x14], edi
mov dword [ebx + 0x100], 2
dec edx
and esi, edx
sar esi, 3
add edi, esi
xor edx, edx
test edi, edi
setg dl
add esi, ecx
xor ecx, ecx
dec edx
and edx, edi
mov edi, dword [ebp - 0x14]
test esi, esi
setg cl
mov dword [ebp - 0x18], edx
xor edx, edx
dec ecx
and ecx, esi
mov esi, edi
sub esi, eax
sub esi, dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
add esi, dword [ebp - 8]
test esi, esi
setle dl
xor ecx, ecx
dec edx
and esi, edx
sar esi, 3
add edi, esi
test edi, edi
setg cl
add eax, esi
xor edx, edx
dec ecx
and ecx, edi
test eax, eax
setg dl
mov dword [ebp - 0x14], ecx
dec edx
and edx, eax
mov dword [ebp - 0x1c], edx
mov eax, dword [ebx + 0x100]
test eax, eax
jle 0x10663c5
add eax, eax
add eax, eax
push eax
call fcn.01046c10
mov dword [ebx + 0xc0], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0xc4], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x128], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x118], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp dword [ebx + 0x6c], 0
je 0x10664c0
cmp dword [ebx + 0x2c], 0
je 0x10663e9
cmp dword [ebx + 8], 0
je 0x10664c0
cmp dword [ebx + 0x68], 0
je 0x10664c0
mov edx, dword [ebx + 0x100]
add edx, edx
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x104], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x10c], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x108], eax
test eax, eax
je 0x1066497
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x100]
add edx, edx
add esp, 0xc
add edx, edx
push edx
call fcn.01046c10
mov dword [ebx + 0x110], eax
test eax, eax
jne 0x10664aa
pop edi
mov dword [ebp - 4], 0x8007000e
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebx + 0x100]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov eax, dword [ebx + 0x100]
cmp eax, 1
jle 0x10664e4
cmp dword [ebx + 0x6c], 0
jne 0x10664e4
pop edi
mov dword [ebp - 4], 0x80040000
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor esi, esi
xor edi, edi
mov dword [ebp + 0x14], esi
cmp eax, esi
jle 0x106663e
mov edx, dword [ebx + 0xc4]
mov dword [ebx + 0xc8], esi
mov dword [ebx + 0xd0], esi
mov dword [ebx + 0xcc], esi
mov dword [edx + edi*4], esi
cmp dword [ebx + 8], esi
je 0x106660b
mov eax, dword [ebp + edi*4 - 0x18]
mov esi, dword [ebp + edi*4 - 0x20]
xor ecx, ecx
test eax, eax
setns cl
xor edx, edx
dec ecx
and eax, ecx
test esi, esi
setns dl
mov dword [ebp + edi*4 - 0x18], eax
sub eax, dword [ebp - 0x10]
mov dword [ebx + 0xc8], eax
dec edx
and esi, edx
mov ecx, esi
sub ecx, dword [ebp - 8]
mov dword [ebp + edi*4 - 0x20], esi
mov dword [ebp + 8], ecx
cmp eax, 0xfc000000
jge 0x106655a
mov eax, 0xfc000000
jmp 0x1066566
cmp eax, 0x3ffffff
jle 0x1066566
mov eax, 0x3ffffff
mov edx, dword [0x1009830]
lea ecx, [eax + 0x4000000]
mov eax, ecx
shr eax, 0x11
and eax, 0x3ff
and ecx, 0x1ffff
mov dword [ebp + 0x10], ecx
mov ecx, dword [edx + eax*4]
mov eax, dword [edx + eax*4 + 4]
sub eax, ecx
imul eax, dword [ebp + 0x10]
cdq
and edx, 0x1ffff
add eax, edx
sar eax, 0x11
add eax, ecx
mov ecx, dword [ebx + 0xc0]
mov dword [ecx + edi*4], eax
mov ecx, dword [ebx + 0xc8]
cmp ecx, 0xffffd70b
jle 0x10665c8
cmp ecx, 0x28f5
jge 0x10665c8
cmp dword [ebp + 8], 0xffffd70b
jg 0x10665cf
mov dword [ebp + 0x14], 1
mov edx, dword [ebp - 8]
lea eax, [ecx + edx]
cmp eax, esi
jl 0x106660b
mov eax, dword [ebx + 0x20]
sub esi, ecx
add esi, eax
mov ecx, esi
sar ecx, 0xa
mov dword [ebx + 0xd0], esi
test ecx, ecx
jne 0x10665f3
xor eax, eax
jmp 0x10665f9
cdq
idiv ecx
shl eax, 0xa
mov ecx, dword [ebx + 0xc4]
mov edx, dword [ebx + 0x68]
mov dword [ebx + 0xcc], eax
mov dword [ecx + edi*4], edx
cmp dword [ebx + 0x2c], 0
je 0x106661d
mov eax, dword [ebx + 0xc4]
cmp dword [eax + edi*4], 0
je 0x106662f
push edi
push ebx
call fcn.01065840
mov dword [ebp - 4], eax
test eax, eax
js 0x1065c83
inc edi
xor esi, esi
cmp edi, dword [ebx + 0x100]
jl 0x10664f3
mov ecx, dword [ebp + 0x14]
xor edi, edi
mov dword [ebx + 8], ecx
mov dword [ebx + 0x114], 0x7ffffe
cmp dword [ebx + 0x100], esi
jle 0x10666f6
lea esp, [esp]
mov edx, dword [ebx + 0x118]
mov dword [edx + edi*4], 0x7ffffe
cmp dword [ebx + 8], esi
je 0x10666e9
mov ecx, dword [ebp + edi*4 - 0x20]
cmp ecx, 0xfc000000
jge 0x1066685
mov ecx, 0xfc000000
jmp 0x1066692
cmp ecx, 0x3ffffff
jle 0x1066692
mov ecx, 0x3ffffff
mov edx, dword [0x1009830]
add ecx, 0x4000000
mov eax, ecx
shr eax, 0x11
and eax, 0x3ff
mov esi, dword [edx + eax*4]
mov eax, dword [edx + eax*4 + 4]
sub eax, esi
and ecx, 0x1ffff
imul eax, ecx
cdq
and edx, 0x1ffff
add eax, edx
sar eax, 0x11
push 0
add eax, esi
cdq
push 0x7ffffe
push edx
push eax
call fcn.01080030
mov ecx, dword [ebx + 0x118]
shrd eax, edx, 0x14
sar edx, 0x14
mov dword [ecx + edi*4], eax
xor esi, esi
inc edi
cmp edi, dword [ebx + 0x100]
jl 0x1066660
mov edi, 0x100000
cmp dword [ebx + 0x2c], esi
je 0x1066742
cmp dword [ebx + 0x24], esi
je 0x1066718
push ebx
call fcn.01065a40
mov dword [ebp - 4], eax
test eax, eax
js 0x1065c83
xor esi, esi
cmp dword [ebx + 8], esi
jne 0x1066742
xor eax, eax
cmp dword [ebx + 0x100], esi
jle 0x1066742
jmp 0x1066730
mov edx, dword [ebx + 0xc0]
mov dword [edx + eax*4], edi
inc eax
cmp eax, dword [ebx + 0x100]
jl 0x1066730
cmp dword [ebx + 0x6c], esi
je 0x106675c
mov eax, dword [ebx + 0x30]
cmp eax, esi
je 0x1066756
push eax
call fcn.01046c30
xor esi, esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x90], esi
mov dword [ebx + 0xac], edi
mov dword [ebx + 0xd8], esi
cmp dword [ebx + 0x58], esi
je 0x1066793
mov ecx, dword [ebx + 0x5c]
imul ecx, dword [ebp - 0xc]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebx + 0xd4], eax
jmp 0x1066799
mov dword [ebx + 0xd4], esi
cmp dword [ebx + 0x60], esi
je 0x1065c83
mov ecx, dword [ebx + 0x64]
cmp ecx, esi
jne 0x10667b8
mov edx, dword [ebx + 0xd4]
inc edx
mov dword [ebx + 0xe0], edx
jmp 0x10667d5
mov eax, dword [ebx + 0xd4]
inc eax
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0xe0], eax
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0xe4], eax
mov dword [ebx + 0xdc], esi
mov dword [ebx + 0xec], esi
mov dword [ebx + 0xe8], esi
cmp ecx, esi
je 0x1065c83
mov eax, dword [ebp - 4]
mov dword [ebx + 0xf0], edi
mov dword [ebx + 0xf4], edi
pop edi
mov dword [ebx + 0xf8], esi
mov dword [ebx + 0xfc], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10