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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
fld qword [0x307f088]
push ebx
push esi
fstp qword [esp + 0x8c]
fld qword [0x307f088]
mov esi, eax
xor eax, eax
fstp qword [esp + 0x74]
cmp esi, eax
push edi
mov ebx, ecx
mov edi, edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x54], 5
je 0x10004a0a
fld qword [0x307f070]
mov dword [esp + 0x44], eax
fstp qword [esp + 0x88]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push edx
push eax
push ebx
push edi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x68]
push ecx
call fcn.10004300
add esp, 0x20
test eax, eax
je 0x10004a7a
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
neg esi
sbb esi, esi
and esi, 0x19
add esi, 0x19
mov dword [edx], esi
mov dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
push ebx
lea edx, [esp + 0x94]
push edi
push edx
call fcn.10003cd0
add esp, 0x14
test eax, eax
mov dword [esp + 0x44], eax
je 0x100049bb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
push ebx
push edi
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.10004300
add esp, 0x20
test eax, eax
je 0x10004a71
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [eax], 0x19
mov dword [ecx], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x84], ebx
jmp 0x10004a83
mov dword [esp + 0x84], edi
mov edi, ebx
lea esi, [edi*4]
lea ecx, [esi + 4]
push ecx
mov dword [esp + 0x54], edi
call fcn.10018430
push esi
mov ebx, eax
call fcn.10018430
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x54]
mov dword [esp + 0x24], eax
mov eax, 0x51eb851f
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea eax, [edx + eax + 1]
add esp, 8
cmp eax, 5
mov dword [esp + 0xa4], ecx
jge 0x10004ad1
mov dword [esp + 0x54], eax
xor ecx, ecx
cmp dword [esp + 0x54], ecx
jle 0x100052a5
fld qword [esp + 0x78]
fld qword [esp + 0x90]
jmp 0x10004af0
mov edi, dword [esp + 0xa4]
mov esi, dword [esp + 0x54]
mov eax, ecx
imul eax, edi
cdq
add esi, esi
add esi, esi
add esi, esi
idiv esi
mov edx, dword [esp + 0x4c]
lea eax, [edx + eax*8]
mov dword [esp + 0x3c], eax
lea eax, [ecx + 1]
mov dword [esp + 0x60], eax
imul eax, edi
cdq
idiv esi
mov ecx, dword [esp + 0x4c]
lea ecx, [ecx + eax*8]
cmp ecx, dword [esp + 0x84]
mov dword [esp + 0x58], ecx
jg 0x100052db
cmp dword [esp + 0x44], 0
je 0x10004c82
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
sub eax, edx
lea ecx, [eax*4 + 4]
mov esi, ecx
shr ecx, 2
mov dword [esp + 0x2c], eax
lea edi, [ebx + edx*4]
xor eax, eax
mov dword [esp + 0x30], edi
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x58]
mov esi, eax
imul esi, dword [ebp + 0x10]
add esi, dword [ebp + 0xc]
cmp eax, ecx
jge 0x10004c1e
sub ecx, eax
mov dword [esp + 0x24], ecx
nop
mov edi, dword [esp + 0x14]
cmp edi, dword [esp + 0xc]
jge 0x10004c0c
mov edx, edi
lea ecx, [ebx + edx*4 + 8]
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
movzx eax, byte [eax + esi]
mov edx, eax
sar edx, 7
and edx, 1
add dword [ecx - 4], edx
mov edx, eax
sar edx, 6
and edx, 1
add dword [ecx], edx
mov edx, eax
sar edx, 5
and edx, 1
add dword [ecx + 4], edx
mov edx, eax
sar edx, 4
and edx, 1
add dword [ecx + 8], edx
mov edx, eax
sar edx, 3
and edx, 1
add dword [ecx + 0xc], edx
mov edx, eax
sar edx, 2
and edx, 1
add dword [ecx + 0x10], edx
mov edx, eax
sar edx, 1
and edx, 1
add dword [ecx + 0x14], edx
and eax, 1
add dword [ecx + 0x18], eax
add edi, 8
add ecx, 0x20
cmp edi, dword [esp + 0xc]
jl 0x10004ba0
add esi, dword [ebp + 0x10]
sub dword [esp + 0x24], 1
jne 0x10004b90
mov edx, dword [esp + 0x14]
cmp dword [ebp + 0x1c], 0
je 0x10004c5a
cmp edx, dword [esp + 0xc]
jge 0x10004d0d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x3c]
add eax, 4
mov edi, dword [eax - 4]
sub edi, dword [eax]
add eax, 4
sub edi, edx
add edi, esi
sub ecx, 1
mov dword [eax - 4], edi
jne 0x10004c41
jmp 0x10004d0d
cmp edx, dword [esp + 0xc]
jge 0x10004d0d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
add eax, 4
nop
mov edx, dword [eax - 4]
add dword [eax], edx
add eax, 4
sub ecx, 1
jne 0x10004c70
jmp 0x10004d0d
mov edi, dword [esp + 0x14]
mov esi, edi
imul esi, dword [ebp + 0x10]
add esi, dword [ebp + 0xc]
cmp edi, dword [esp + 0xc]
mov dword [ebx + edi*4], 0
jge 0x10004d0d
mov eax, dword [esp + 0x3c]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x34], eax
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x48], eax
lea esp, [esp]
mov ecx, dword [esp + 0x34]
xor edx, edx
cmp ecx, eax
jge 0x10004ce6
lea ebx, [ebx]
movzx eax, byte [ecx + esi]
add edx, dword [eax*4 + 0x3081100]
mov eax, dword [esp + 0x48]
add ecx, 1
cmp ecx, eax
jl 0x10004cd0
cmp dword [ebp + 0x1c], 0
mov ecx, dword [ebx + edi*4]
je 0x10004cfb
sub ecx, edx
sub ecx, dword [esp + 0x3c]
add ecx, dword [esp + 0x58]
jmp 0x10004cfd
add ecx, edx
add esi, dword [ebp + 0x10]
mov dword [ebx + edi*4 + 4], ecx
add edi, 1
cmp edi, dword [esp + 0xc]
jl 0x10004cc0
mov dword [esp + 0x30], 0
mov ecx, dword [esp + 0x50]
xor edx, edx
cmp ecx, edx
jle 0x10004d29
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
rep stosd dword es:[edi], eax
mov edi, 0x64
mov dword [esp + 0x48], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x2c], edi
mov edi, edi
lea ecx, [edi + edi]
mov eax, 0x55555556
imul ecx
mov ecx, dword [esp + 0x14]
mov esi, edx
shr esi, 0x1f
add esi, edx
lea edx, [edi + esi*2]
mov dword [esp + 0x38], edx
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0xc]
sub eax, dword [esp + 0x38]
mov dword [esp + 0x24], esi
cmp ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x9c], eax
jge 0x10005205
jmp 0x10004d93
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x38]
mov eax, dword [eax + ecx*4]
add edx, ecx
cmp eax, edx
mov dword [esp + 0x10], edx
jge 0x10004de4
test eax, eax
jl 0x100051f7
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + eax*4]
neg ecx
mov dword [esp + 0x18], ecx
jns 0x100051e4
fstp st(0)
push ebx
fstp st(0)
call fcn.10018490
mov edx, dword [esp + 0x20]
push edx
call fcn.10018490
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ecx + esi]
lea eax, [edx + edi]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + eax*4]
add esi, ecx
mov edx, dword [ebx + esi*4]
mov dword [esp + 0x40], esi
mov esi, eax
sub esi, edx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x58]
sub edx, dword [esp + 0x3c]
mov eax, 0x66666667
mov dword [esp + 0x20], edx
imul edx, edi
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jle 0x100051d9
mov edx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
add edx, ecx
mov eax, dword [ebx + edx*4]
sub eax, dword [ebx + edi*4]
lea eax, [eax + eax*2]
cmp esi, eax
jle 0x100051d9
mov edx, dword [ebx + ecx*4]
mov eax, dword [esp + 0x28]
sub eax, edx
lea eax, [eax + eax*2]
cmp esi, eax
jle 0x100051d9
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*4]
sub eax, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x28], eax
lea eax, [eax + eax*2]
lea esi, [edx + edx]
cdq
idiv esi
cmp ecx, edi
mov esi, ecx
jge 0x10004e92
lea esp, [esp]
mov ecx, dword [ebx + esi*4 + 4]
sub ecx, dword [ebx + esi*4]
cmp ecx, eax
jge 0x10004e92
add esi, 1
cmp esi, edi
jl 0x10004e80
mov ecx, dword [esp + 0x10]
cmp ecx, esi
jle 0x10004eb6
mov edx, dword [esp + 0x40]
mov edi, edi
cmp ecx, edx
jle 0x10004eb6
mov edi, dword [ebx + ecx*4 + 4]
sub edi, dword [ebx + ecx*4]
cmp edi, eax
jge 0x10004eb6
sub ecx, 1
cmp ecx, esi
jg 0x10004ea0
mov eax, dword [ebx + esi*4]
mov edi, dword [ebx + ecx*4]
sub edi, eax
cmp ecx, esi
mov dword [esp + 0x34], edi
je 0x10004f1d
mov eax, ecx
sub eax, esi
imul eax, dword [esp + 0x20]
lea eax, [eax + eax*2]
cdq
and edx, 3
add eax, edx
sar eax, 2
cmp edi, eax
jg 0x10004f1d
mov edx, dword [ebx + esi*4 + 4]
sub edx, dword [ebx + esi*4]
add ecx, 1
lea eax, [esi + 1]
cmp eax, ecx
mov dword [esp + 0x10], edx
jge 0x10004f12
mov edx, dword [ebx + eax*4 + 4]
sub edx, dword [ebx + eax*4]
cmp edx, dword [esp + 0x10]
jge 0x10004f07
mov dword [esp + 0x10], edx
jmp 0x10004f0b
mov edx, dword [esp + 0x10]
add eax, 1
cmp eax, ecx
jl 0x10004ef4
imul edx, dword [esp + 0x38]
cmp edx, dword [esp + 0x28]
jg 0x10004f3d
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + ecx*4 + 4]
add ecx, 1
test eax, eax
mov dword [esp + 0x18], ecx
jge 0x100051e4
neg eax
mov ecx, eax
jmp 0x100051e0
mov edi, ecx
sub edi, esi
mov eax, 0x77777777
imul edi
sub edx, edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
add esi, eax
mov eax, dword [esp + 0x14]
cmp esi, eax
jg 0x10004f60
mov esi, eax
mov edi, ecx
sub edi, esi
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, eax
mov eax, dword [esp + 0xc]
cmp ecx, eax
jl 0x10004f83
mov ecx, eax
mov eax, dword [ebx + ecx*4]
mov edx, dword [ebx + esi*4]
mov dword [esp + 0x40], eax
sub eax, edx
mov edx, dword [esp + 0x38]
lea edi, [edx*8]
sub edi, edx
add edi, edi
sub edi, edx
cdq
idiv edi
lea edi, [esi - 1]
cmp edi, dword [esp + 0x14]
mov dword [esp + 0x28], eax
jl 0x10004fef
mov edx, dword [esp + 0x18]
sub edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
add edx, eax
mov dword [esp + 0x20], edx
cmp edi, dword [esp + 0x20]
jl 0x10004fef
mov eax, ecx
sub eax, esi
cdq
sub eax, edx
sar eax, 1
mov edx, esi
sub edx, eax
cmp edi, edx
jle 0x10004fef
mov eax, dword [ebx + edi*4 + 4]
sub eax, dword [ebx + edi*4]
cmp eax, dword [esp + 0x28]
jle 0x10004fef
sub edi, 1
cmp edi, dword [esp + 0x14]
jge 0x10004fc2
lea eax, [ecx + 1]
add edi, 1
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x98], eax
mov dword [esp + 0x10], eax
jge 0x10005059
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
add eax, eax
add eax, edx
mov edx, dword [esp + 0x24]
add eax, edx
mov dword [esp + 0x20], eax
lea esp, [esp]
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x10], eax
jge 0x10005059
mov eax, ecx
sub eax, esi
cdq
sub eax, edx
sar eax, 1
add eax, ecx
cmp dword [esp + 0x10], eax
jge 0x10005059
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + eax*4 + 4]
sub edx, dword [ebx + eax*4]
cmp edx, dword [esp + 0x28]
jle 0x10005059
add eax, 1
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
jl 0x10005020
mov eax, dword [esp + 0x10]
sub eax, ecx
mov edx, ecx
lea eax, [eax + eax*2]
sub edx, esi
add eax, eax
cmp eax, edx
mov dword [esp + 0x28], edx
jge 0x10005085
mov eax, esi
sub eax, edi
lea eax, [eax + eax*2]
add eax, eax
cmp eax, edx
mov dword [esp + 0x18], 1
jl 0x1000508d
mov dword [esp + 0x18], 0
mov edi, dword [ebx + edi*4]
mov edx, dword [ebx + esi*4]
mov eax, edx
sub eax, edi
mov dword [esp + 0x20], edi
lea edi, [eax + eax*2]
lea edi, [eax + edi*8]
mov eax, dword [esp + 0x40]
add edi, edi
sub eax, edx
cmp edi, eax
jge 0x100050d2
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*4]
mov edx, dword [ebx + ecx*4]
sub eax, edx
sub edx, dword [ebx + esi*4]
lea edi, [eax + eax*2]
lea eax, [eax + edi*8]
add eax, eax
cmp eax, edx
jge 0x100050d2
mov dword [esp + 0x18], 1
jmp 0x10005108
cmp dword [esp + 0x18], 0
jne 0x10005108
mov edx, dword [ebx + esi*4]
mov edi, dword [esp + 0x10]
mov edi, dword [ebx + edi*4]
mov eax, edx
sub eax, dword [esp + 0x20]
add dword [esp + 0x68], eax
mov dword [esp + 0x64], eax
mov eax, dword [ebx + ecx*4]
sub edi, eax
add dword [esp + 0x74], edi
sub eax, edx
add dword [esp + 0x48], eax
mov dword [esp + 0x5c], edi
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
lea eax, [esi - 1]
cmp eax, edx
jl 0x10005126
cmp dword [edi + eax*4], esi
jle 0x10005126
mov dword [edi + eax*4], esi
sub eax, 1
cmp eax, edx
jge 0x10005117
mov edx, dword [esp + 0xc]
cmp ecx, edx
mov eax, ecx
jge 0x1000513f
mov ecx, dword [edi + eax*4]
test ecx, ecx
jg 0x1000513f
neg ecx
mov eax, ecx
cmp eax, edx
jl 0x10005130
cmp esi, eax
jge 0x10005152
mov ecx, dword [esp + 0x1c]
lea edi, [ecx + esi*4]
mov ecx, eax
sub ecx, esi
neg eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x100051c9
mov eax, dword [esp + 0x28]
fild dword [esp + 0x34]
imul eax, eax
fmul qword [0x307f0b8]
mov edx, eax
shl edx, 4
sub edx, eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0x5c]
shl edx, 4
cmp dword [esp + 0x30], ecx
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
mov dword [esp + 0x20], eax
fdivp st(1)
fild dword [esp + 0x20]
fmul qword [0x307f0b8]
fidiv dword [esp + 0x40]
je 0x100051b2
fxch st(2)
fsub st(2)
fst qword [esp + 0x90]
fstp st(2)
jmp 0x100051bf
faddp st(2)
fxch st(1)
fst qword [esp + 0x90]
fxch st(1)
faddp st(2)
fxch st(1)
fst qword [esp + 0x78]
fxch st(1)
add dword [esp + 0x6c], 1
add dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x98]
add ecx, dword [esp + 0xa0]
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x9c]
mov edi, dword [esp + 0x2c]
jl 0x10004d8f
jmp 0x10005205
mov ecx, dword [esp + 0xc]
neg ecx
cmp eax, ecx
jg 0x100052fc
lea eax, [edi*8]
sub eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edi, eax
cmp edi, 8
mov dword [esp + 0x2c], edi
jg 0x10004d40
cmp dword [esp + 0x30], 0
mov esi, dword [esp + 0x50]
jne 0x1000526b
xor eax, eax
test esi, esi
jl 0x10005246
mov edx, dword [ebx + eax*4]
neg edx
mov dword [ebx + eax*4], edx
add eax, 1
cmp eax, esi
jle 0x10005237
lea eax, [esi - 1]
cdq
sub eax, edx
sar eax, 1
js 0x1000526b
mov ecx, esi
sub ecx, eax
lea ecx, [ebx + ecx*4]
mov edi, dword [ecx]
mov edx, dword [ebx + eax*4]
mov dword [ebx + eax*4], edi
mov dword [ecx], edx
sub eax, 1
add ecx, 4
test eax, eax
jge 0x10005257
mov eax, dword [esp + 0xc]
mov edx, esi
sub edx, dword [esp + 0x14]
sub esi, eax
mov eax, dword [esp + 0x30]
add eax, 1
cmp eax, 2
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], eax
jl 0x10004d15
mov ecx, dword [esp + 0x60]
cmp ecx, dword [esp + 0x54]
jl 0x10004af0
fstp st(0)
fstp st(0)
push ebx
call fcn.10018490
mov eax, dword [esp + 0x20]
push eax
call fcn.10018490
fld qword [0x307f088]
fld qword [esp + 0x80]
add esp, 8
fucompp
fnstsw ax
test ah, 0x44
jp 0x1000531d
fld qword [0x307f090]
xor ecx, ecx
jmp 0x10005386
fstp st(0)
push ebx
fstp st(0)
call fcn.10018490
mov eax, dword [esp + 0x20]
push eax
call fcn.10018490
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fstp st(0)
push ebx
fstp st(0)
call fcn.10018490
mov ecx, dword [esp + 0x20]
push ecx
call fcn.10018490
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x18], 0
fld qword [esp + 0x90]
fdiv qword [esp + 0x78]
fcom qword [0x307f088]
fnstsw ax
je 0x1000535c
test ah, 0x41
jne 0x10005349
mov edx, dword [esp + 0x44]
xor ecx, ecx
neg edx
mov dword [esp + 0x44], edx
jmp 0x1000536c
mov edx, dword [esp + 0x44]
fchs
neg edx
mov ecx, 2
mov dword [esp + 0x44], edx
jmp 0x1000536c
test ah, 0x41
jne 0x10005368
mov ecx, 2
jmp 0x1000536c
xor ecx, ecx
fchs
fld qword [esp + 0x78]
fsqrt
fmulp st(1)
fadd qword [0x307f0b0]
fdivr qword [0x307f0a8]
fsubr qword [0x307f070]
fmul qword [esp + 0x88]
fcom qword [0x307f0a0]
fnstsw ax
test ah, 5
jp 0x100053a2
fstp st(0)
fld qword [0x307f0a0]
fld qword [0x307f098]
mov edx, dword [ebp + 0x14]
fnstcw word [esp + 0xc]
movzx eax, word [esp + 0xc]
or ah, 0xc
fmul st(1)
pop edi
pop esi
pop ebx
mov dword [esp + 0x54], eax
fldcw word [esp + 0x54]
fistp qword [esp + 0x7c]
mov eax, dword [esp + 0x7c]
mov dword [edx], eax
mov eax, dword [esp + 0x38]
mov edx, dword [ebp + 8]
add ecx, eax
fstp st(0)
fldcw word [esp]
and ecx, 3
mov dword [edx], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret