Function at 0x10030f90
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x178
mov eax, dword [0x1004b00c]
xor eax, esp
mov dword [esp + 0x174], eax
cmp byte [0x100d19f4], 0
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], eax
movq xmm0, qword [eax + 0xc]
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x28], ecx
movq qword [esp + 0x58], xmm0
mov dword [esp + 0x44], eax
je 0x10031185
mov edx, dword [0x100d19f0]
lea ecx, [esp + 0x134]
call fcn.10030e80
cmp dword [eax + 0x14], 0x10
jb 0x10030ff5
mov eax, dword [eax]
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x14]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x14]
push ecx
push eax
mov dword [esp + 0x1c], 0x2b6277
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
test eax, eax
je 0x10031078
push eax
push 1
push 4
push esi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
call esi
push dword [esp + 0x28]
mov ecx, dword [edi + 0x14]
push ecx
push 0xc
push dword [esp + 0x38]
lea eax, [ecx - 1]
mov dword [edi + 0x14], eax
call esi
push dword [esp + 0x38]
mov ecx, dword [edi + 0x14]
push ecx
push 0x24
push dword [esp + 0x50]
lea eax, [ecx - 1]
mov dword [edi + 0x14], eax
call esi
push dword [esp + 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x34
jmp 0x10031122
mov ecx, 0x3f
xor edx, edx
nop
mov al, byte [edx + str.r_7._2]
xor al, cl
inc ecx
mov byte [esp + edx + 0x70], al
and ecx, 0x800000ff
jns 0x1003109d
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x10
jl 0x10031080
mov byte [esp + 0x80], 0
mov ecx, 0x6e
xor edx, edx
mov al, byte [edx + 0x10044c4c]
xor al, cl
inc ecx
mov byte [esp + edx + 0xd0], al
and ecx, 0x800000ff
jns 0x100310d2
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x14
jl 0x100310b2
push 0
lea eax, [esp + 0x74]
mov byte [esp + 0xe8], 0
push eax
lea eax, [esp + 0xd8]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xorps xmm0, xmm0
mov dword [esp + 0xe0], 0
movaps xmmword [esp + 0xd0], xmm0
mov byte [esp + 0xe4], 0
movaps xmmword [esp + 0x70], xmm0
mov byte [esp + 0x80], 0
mov edx, dword [esp + 0x148]
cmp edx, 0x10
jb 0x10031160
mov ecx, dword [esp + 0x134]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10031156
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10031156
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10037fb5
add esp, 8
mov dword [esp + 0x144], 0
mov dword [esp + 0x148], 0xf
mov byte [esp + 0x134], 0
mov byte [0x100d19f4], 0
cmp byte [0x100d19f5], 0
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
je 0x1003134e
mov edx, dword [0x100d19f0]
lea ecx, [esp + 0x14c]
call fcn.10030e80
mov ecx, eax
cmp dword [ecx + 0x14], 0x10
jb 0x100311b4
mov ecx, dword [ecx]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [edi]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
push ecx
mov dword [esp + 0x1c], 0x2b6272
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
test eax, eax
je 0x10031231
push eax
push 1
lea ecx, [edi + 0x14]
push 4
push ecx
call esi
push dword [esp + 0x28]
mov ecx, dword [edi + 0x14]
push ecx
push 0xc
push dword [esp + 0x40]
lea eax, [ecx - 1]
mov dword [edi + 0x14], eax
call esi
push dword [esp + 0x38]
mov ecx, dword [edi + 0x14]
push ecx
push 0x24
push dword [esp + 0x48]
lea eax, [ecx - 1]
mov dword [edi + 0x14], eax
call esi
push dword [esp + 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x34
jmp 0x100312eb
mov ecx, 0x12
xor edx, edx
nop dword [eax + eax]
mov al, byte [edx + str._bprvmH]
xor al, cl
inc ecx
mov byte [esp + edx + 0x90], al
and ecx, 0x800000ff
jns 0x10031260
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x10
jl 0x10031240
mov byte [esp + 0xa0], 0
mov ecx, 0xa1
xor edx, edx
mov al, byte [edx + 0x10044c64]
xor al, cl
inc ecx
mov byte [esp + edx + 0xf0], al
and ecx, 0x800000ff
jns 0x10031295
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x14
jl 0x10031275
push 0
lea eax, [esp + 0x94]
mov byte [esp + 0x108], 0
push eax
lea eax, [esp + 0xf8]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xorps xmm0, xmm0
mov dword [esp + 0x100], 0
movaps xmmword [esp + 0xf0], xmm0
mov byte [esp + 0x104], 0
movaps xmmword [esp + 0x90], xmm0
mov byte [esp + 0xa0], 0
mov edx, dword [esp + 0x160]
cmp edx, 0x10
jb 0x10031329
mov ecx, dword [esp + 0x14c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1003131f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1003131f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10037fb5
add esp, 8
mov dword [esp + 0x15c], 0
mov dword [esp + 0x160], 0xf
mov byte [esp + 0x14c], 0
mov byte [0x100d19f5], 0
cmp byte [0x100d19f6], 0
je 0x1003156e
mov edx, dword [0x100d19f0]
lea ecx, [esp + 0x164]
call fcn.10030e80
cmp dword [eax + 0x14], 0x10
jb 0x10031375
mov eax, dword [eax]
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x24], ecx
mov ecx, dword [edi + 4]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x14]
push ecx
push eax
mov dword [esp + 0x1c], 0x2b6272
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
test eax, eax
je 0x100313eb
push eax
push 1
lea eax, [edi + 0x14]
push 4
push eax
call esi
push dword [esp + 0x28]
push 1
push 0xc
push dword [esp + 0x40]
call esi
push dword [esp + 0x38]
mov ecx, dword [edi + 0x14]
push ecx
push 0x1c
push dword [esp + 0x48]
lea eax, [ecx - 1]
mov dword [edi + 0x14], eax
call esi
push dword [esp + 0x48]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x34
jmp 0x1003149d
mov ecx, 0x5f
xor edx, edx
mov al, byte [edx + 0x10044c94]
xor al, cl
inc ecx
mov byte [esp + edx + 0xb0], al
and ecx, 0x800000ff
jns 0x10031412
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x10
jl 0x100313f2
mov byte [esp + 0xc0], 0
mov ecx, 0x69
xor edx, edx
mov al, byte [edx + 0x10044c7c]
xor al, cl
inc ecx
mov byte [esp + edx + 0x110], al
and ecx, 0x800000ff
jns 0x10031447
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x14
jl 0x10031427
push 0
lea eax, [esp + 0xb4]
mov byte [esp + 0x128], 0
push eax
lea eax, [esp + 0x118]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xorps xmm0, xmm0
mov dword [esp + 0x120], 0
movaps xmmword [esp + 0x110], xmm0
mov byte [esp + 0x124], 0
movaps xmmword [esp + 0xb0], xmm0
mov byte [esp + 0xc0], 0
mov edx, dword [esp + 0x178]
cmp edx, 0x10
jb 0x100314db
mov ecx, dword [esp + 0x164]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100314d1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100314d1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10037fb5
add esp, 8
xor edx, edx
mov dword [esp + 0x174], 0
mov dword [esp + 0x178], 0xf
xor esi, esi
mov byte [esp + 0x164], 0
mov dword [esp + 0x18], edx
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov eax, dword [esi + eax]
mov dword [ecx + edx + 0x18], eax
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov eax, dword [esi + eax + 0xc]
mov dword [ecx + edx + 0x14], eax
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov eax, dword [esi + eax + 4]
mov dword [ecx + edx + 0xc], eax
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov eax, dword [esi + eax + 8]
mov dword [ecx + edx + 0x10], eax
mov edx, dword [edi + 4]
mov ecx, dword [edi]
add ecx, dword [esp + 0x18]
mov eax, dword [esi + edx + 0x10]
mov dword [ecx], eax
mov eax, dword [esi + edx + 0x14]
mov dword [ecx + 4], eax
mov eax, dword [esi + edx + 0x18]
add esi, 0x1c
mov edx, dword [esp + 0x18]
add edx, 0x24
mov dword [ecx + 8], eax
mov dword [esp + 0x18], edx
cmp esi, 0x1ab3f00
jl 0x10031501
mov byte [0x100d19f6], 0
cmp dword [edi + 0xc], 3
xorps xmm1, xmm1
movsd xmm0, qword [0x10046820]
movsd qword [esp + 0x48], xmm0
movsd xmm0, qword [0x10046840]
movsd qword [esp + 0x38], xmm1
movsd qword [esp + 0x50], xmm0
jne 0x100315a6
mov byte [edi + 0x20], 1
mov dword [edi + 0x1c], 1
jmp 0x100315b0
cmp byte [edi + 0x20], 0
je 0x10031da4
cmp dword [edi + 0x1c], 1
jne 0x10031646
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
call eax
movss xmm1, dword [0x1004692c]
movss xmm4, dword [eax]
movss xmm3, dword [eax + 4]
mov eax, dword [edi + 0x10]
movss xmm2, dword [eax]
movaps xmm0, xmm2
addss xmm0, xmm1
comiss xmm0, xmm4
jb 0x10031615
subss xmm2, xmm1
comiss xmm4, xmm2
jb 0x10031615
movss xmm2, dword [eax + 4]
movaps xmm0, xmm2
addss xmm0, xmm1
comiss xmm0, xmm3
jb 0x10031615
subss xmm2, xmm1
comiss xmm3, xmm2
jb 0x10031615
mov dword [edi + 0x1c], 2
jmp 0x10031635
mov eax, dword [0x102f7318]
inc eax
mov byte [0x102f731c], 0
mov dword [0x102f7318], eax
cmp eax, 0x96
jne 0x10031646
mov dword [edi + 0x1c], 0
mov byte [0x102f731c], 1
mov dword [0x102f7318], 0
cmp dword [edi + 0x1c], 2
mov esi, dword [0x100d13d0]
jne 0x10031c0a
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + esi*4]
mov eax, dword [0x102f77cc]
cmp eax, dword [ecx + 4]
jle 0x1003168f
push 0x102f77cc
call fcn.100380f9
add esp, 4
cmp dword [0x102f77cc], 0xffffffff
jne 0x1003168f
push 0x102f77cc
call fcn.100380af
add esp, 4
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + esi*4]
mov eax, dword [0x102f77b4]
cmp eax, dword [ecx + 4]
jle 0x100316c8
push 0x102f77b4
call fcn.100380f9
add esp, 4
cmp dword [0x102f77b4], 0xffffffff
jne 0x100316c8
push 0x102f77b4
call fcn.100380af
add esp, 4
mov ecx, dword [0x100d1558]
push 0x102f77d0
mov eax, dword [ecx]
mov eax, dword [eax + 0x4c]
call eax
mov eax, dword [edi]
movss xmm6, dword [0x102f77d0]
movss xmm7, dword [0x102f77d4]
movss xmm4, dword [0x10046910]
movss xmm2, dword [eax]
movss xmm0, dword [eax + 4]
subss xmm2, xmm6
movss xmm5, dword [eax + 8]
subss xmm0, xmm7
subss xmm5, dword [0x102f77d8]
movss xmm1, dword [0x1004694c]
comiss xmm2, xmm4
movss dword [0x102f77bc], xmm2
movss dword [0x102f77c0], xmm0
movss dword [0x102f77c4], xmm5
jbe 0x10031743
subss xmm2, xmm1
movss dword [0x102f77bc], xmm2
comiss xmm0, xmm4
jbe 0x10031754
subss xmm0, xmm1
movss dword [0x102f77c0], xmm0
movss xmm3, dword [0x10046a04]
comiss xmm3, xmm2
jbe 0x1003176d
addss xmm2, xmm1
movss dword [0x102f77bc], xmm2
comiss xmm3, xmm0
jbe 0x1003177e
addss xmm0, xmm1
movss dword [0x102f77c0], xmm0
mulss xmm2, dword [0x100466b4]
mulss xmm0, dword [0x100466b4]
mulss xmm5, dword [0x100466b4]
addss xmm2, xmm6
addss xmm0, xmm7
addss xmm5, dword [0x102f77d8]
comiss xmm2, xmm4
movss dword [ebp + 0x10], xmm2
movss dword [ebp + 0x14], xmm0
movss dword [ebp + 0x18], xmm5
jbe 0x100317c3
subss xmm2, xmm1
movss dword [ebp + 0x10], xmm2
comiss xmm0, xmm4
jbe 0x100317d1
subss xmm0, xmm1
movss dword [ebp + 0x14], xmm0
comiss xmm3, xmm2
jbe 0x100317df
addss xmm2, xmm1
movss dword [ebp + 0x10], xmm2
comiss xmm3, xmm0
jbe 0x100317ed
addss xmm0, xmm1
movss dword [ebp + 0x14], xmm0
mov ecx, dword [0x100d1558]
lea edx, [ebp + 0x10]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x50]
call eax
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
call eax
mov ecx, dword [edi + 0x10]
movsd xmm4, qword [esp + 0x38]
movss xmm1, dword [eax]
movss xmm0, dword [eax + 4]
movss xmm2, dword [ecx]
movss xmm3, dword [ecx + 8]
subss xmm2, xmm1
subss xmm3, dword [eax + 8]
movss dword [esp + 0x30], xmm1
movss xmm1, dword [ecx + 4]
subss xmm1, xmm0
movss dword [esp + 0x34], xmm0
movss dword [esp + 0x18], xmm2
movss dword [esp + 0x14], xmm3
cvtps2pd xmm5, xmm2
cvtps2pd xmm0, xmm1
movss dword [esp + 0x1c], xmm1
ucomisd xmm0, xmm4
lahf
test ah, 0x44
jp 0x10031873
ucomisd xmm5, xmm4
lahf
test ah, 0x44
jp 0x10031873
movaps xmm0, xmm4
jmp 0x100318a5
movaps xmm1, xmm5
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [esp + 0x48]
movsd xmm4, qword [esp + 0x38]
movss xmm1, dword [esp + 0x1c]
movss xmm2, dword [esp + 0x18]
comisd xmm4, xmm0
movss xmm3, dword [esp + 0x14]
jbe 0x100318a5
addsd xmm0, qword [esp + 0x50]
mulss xmm1, xmm1
mulss xmm2, xmm2
cvtsd2ss xmm0, xmm0
addss xmm1, xmm2
mulss xmm3, xmm3
movss dword [esp + 0x24], xmm0
xorps xmm0, xmm0
addss xmm1, xmm3
sqrtss xmm0, xmm1
xorps xmm1, xmm1
sqrtss xmm1, xmm0
comiss xmm1, dword [0x10046858]
jbe 0x100318e4
movss xmm2, dword [0x1004692c]
jmp 0x10031910
comiss xmm1, dword [0x10046850]
jbe 0x100318f7
movss xmm2, dword [0x100468cc]
jmp 0x10031910
cvtps2pd xmm0, xmm1
comisd xmm0, xmmword [0x100467f0]
jbe 0x100319a9
movss xmm2, dword [0x100468ac]
mov eax, dword [esp + 0x20]
movaps xmm0, xmm2
mulss xmm0, xmm2
lea esi, [eax + 0x18]
movss dword [esi], xmm2
movss xmm1, dword [eax + 0x20]
mulss xmm1, xmm1
addss xmm1, xmm0
xorps xmm0, xmm0
sqrtss xmm0, xmm1
cvtps2pd xmm1, xmm2
movss dword [esp + 0x18], xmm0
movaps xmm0, xmm4
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [esp + 0x48]
movsd xmm1, qword [esp + 0x38]
comisd xmm1, xmm0
jbe 0x1003195f
addsd xmm0, qword [esp + 0x50]
movss xmm1, dword [ebp + 0x14]
subss xmm1, dword [esp + 0x24]
cvtsd2ss xmm0, xmm0
comiss xmm1, dword [0x10046910]
movaps xmm2, xmm1
movss dword [esp + 0x2c], xmm0
mulss xmm2, dword [0x10046674]
movss dword [esp + 0x1c], xmm1
movss dword [esp + 0x14], xmm2
ja 0x10031a0f
movss xmm0, dword [0x10046a04]
comiss xmm0, xmm1
ja 0x10031a0f
xorps xmm3, xmm3
jmp 0x10031a6a
comiss xmm1, dword [0x1004673c]
mov eax, dword [esp + 0x20]
lea esi, [eax + 0x18]
mov ecx, esi
jbe 0x100319c5
movss xmm2, dword [0x10046888]
jmp 0x100319cd
movss xmm2, dword [0x10046874]
movaps xmm0, xmm2
movss dword [ecx], xmm0
movss xmm1, dword [eax + 0x20]
mulss xmm0, xmm2
or dword [eax + 0x24], 0x20000
mulss xmm1, xmm1
addss xmm0, xmm1
cvtps2pd xmm1, xmm2
sqrtss xmm0, xmm0
ucomisd xmm1, xmm4
movss dword [esp + 0x18], xmm0
lahf
test ah, 0x44
jp 0x1003193f
movaps xmm0, xmm4
jmp 0x1003195f
xorps xmm3, xmm3
comiss xmm3, xmm2
jbe 0x10031a28
movaps xmm0, xmm1
mulss xmm0, dword [0x100469b8]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [esp + 0x20]
xorps xmm3, xmm3
fstp dword [esp + 0x18]
movss xmm0, dword [esp + 0x18]
add esp, 4
comiss xmm3, xmm1
mulss xmm0, dword [0x1004694c]
jbe 0x10031a5e
addss xmm1, xmm0
jmp 0x10031a62
subss xmm1, xmm0
movss xmm0, dword [0x10046a04]
addss xmm1, dword [esp + 0x2c]
comiss xmm1, dword [0x10046910]
movaps xmm2, xmm1
movss dword [esp + 0x1c], xmm1
mulss xmm2, dword [0x10046674]
movss dword [esp + 0x14], xmm2
ja 0x10031a95
comiss xmm0, xmm1
jbe 0x10031ae5
comiss xmm3, xmm2
jbe 0x10031aab
movaps xmm0, xmm1
mulss xmm0, dword [0x100469b8]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [esp + 0x20]
xorps xmm0, xmm0
add esp, 4
comiss xmm0, xmm1
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
mulss xmm0, dword [0x1004694c]
jbe 0x10031ae1
addss xmm1, xmm0
jmp 0x10031ae5
subss xmm1, xmm0
mulss xmm1, dword [0x10046690]
movaps xmm0, xmm1
call fcn.10039020
mov eax, dword [esp + 0x20]
movaps xmm1, xmm0
movss xmm3, dword [esp + 0x30]
movsd xmm2, qword [0x10046780]
shufps xmm1, xmm0, 1
mulss xmm1, dword [esp + 0x18]
mulss xmm0, dword [esp + 0x18]
movss dword [esi], xmm1
cvtps2pd xmm3, xmm3
movss dword [eax + 0x1c], xmm0
mov eax, dword [edi + 0x10]
movss xmm1, dword [eax]
cvtps2pd xmm1, xmm1
movaps xmm0, xmm1
addsd xmm0, xmm2
comisd xmm0, xmm3
jb 0x10031c04
subsd xmm1, xmm2
comisd xmm3, xmm1
jb 0x10031c04
movss xmm1, dword [eax + 4]
movss xmm3, dword [esp + 0x34]
cvtps2pd xmm1, xmm1
cvtps2pd xmm3, xmm3
movaps xmm0, xmm1
addsd xmm0, xmm2
comisd xmm0, xmm3
jb 0x10031c04
subsd xmm1, xmm2
comisd xmm3, xmm1
jb 0x10031c04
mov eax, dword [esp + 0x28]
movss xmm1, dword [eax + 0xec]
movss xmm2, dword [eax + 0xf0]
movss xmm0, dword [eax + 0xf4]
mulss xmm2, xmm2
mulss xmm1, xmm1
mulss xmm0, xmm0
addss xmm2, xmm1
addss xmm2, xmm0
movss xmm0, dword [0x1004687c]
comiss xmm0, xmm2
jb 0x10031c04
movss xmm0, dword [0x102f77bc]
movss xmm2, dword [0x10046700]
comiss xmm2, xmm0
jbe 0x10031bfd
movss xmm1, dword [0x100469c4]
comiss xmm0, xmm1
jbe 0x10031bfd
movss xmm0, dword [0x102f77c0]
comiss xmm2, xmm0
jbe 0x10031bfd
comiss xmm0, xmm1
jbe 0x10031bfd
mov dword [edi + 0xc], 2
mov byte [edi + 0x20], 0
jmp 0x10031c04
mov dword [edi + 0x1c], 3
mov esi, dword [0x100d13d0]
cmp dword [edi + 0x1c], 3
jne 0x10031da4
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + esi*4]
mov eax, dword [0x102f77b8]
cmp eax, dword [ecx + 4]
jle 0x10031c4d
push 0x102f77b8
call fcn.100380f9
add esp, 4
cmp dword [0x102f77b8], 0xffffffff
jne 0x10031c4d
push 0x102f77b8
call fcn.100380af
add esp, 4
mov ecx, dword [0x100d1558]
push 0x102f77a8
mov eax, dword [ecx]
mov eax, dword [eax + 0x4c]
call eax
mov eax, dword [edi]
movss xmm6, dword [0x102f77a8]
movss xmm4, dword [0x10046910]
movss xmm7, dword [0x102f77ac]
movss xmm2, dword [eax]
movss xmm0, dword [eax + 4]
subss xmm2, xmm6
movss xmm5, dword [eax + 8]
subss xmm0, xmm7
subss xmm5, dword [0x102f77b0]
movss xmm1, dword [0x1004694c]
comiss xmm2, xmm4
movss dword [esp + 0x1c], xmm2
jbe 0x10031cb4
subss xmm2, xmm1
movss dword [esp + 0x1c], xmm2
comiss xmm0, xmm4
jbe 0x10031cbd
subss xmm0, xmm1
movss xmm3, dword [0x10046a04]
comiss xmm3, xmm2
jbe 0x10031cd4
addss xmm2, xmm1
movss dword [esp + 0x1c], xmm2
comiss xmm3, xmm0
movss dword [esp + 0x18], xmm0
jbe 0x10031ce9
addss xmm0, xmm1
movss dword [esp + 0x18], xmm0
mulss xmm2, dword [0x100466b4]
mulss xmm0, dword [0x100466b4]
mulss xmm5, dword [0x100466b4]
addss xmm2, xmm6
addss xmm0, xmm7
addss xmm5, dword [0x102f77b0]
comiss xmm2, xmm4
movss dword [ebp + 0x10], xmm2
movss dword [ebp + 0x14], xmm0
movss dword [ebp + 0x18], xmm5
jbe 0x10031d2e
subss xmm2, xmm1
movss dword [ebp + 0x10], xmm2
comiss xmm0, xmm4
jbe 0x10031d3c
subss xmm0, xmm1
movss dword [ebp + 0x14], xmm0
comiss xmm3, xmm2
jbe 0x10031d4a
addss xmm2, xmm1
movss dword [ebp + 0x10], xmm2
comiss xmm3, xmm0
jbe 0x10031d58
addss xmm0, xmm1
movss dword [ebp + 0x14], xmm0
mov ecx, dword [0x100d1558]
lea edx, [ebp + 0x10]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x50]
call eax
movss xmm0, dword [esp + 0x1c]
movss xmm2, dword [0x10046700]
comiss xmm2, xmm0
jbe 0x10031da4
movss xmm1, dword [0x100469c4]
comiss xmm0, xmm1
jbe 0x10031da4
movss xmm0, dword [esp + 0x18]
comiss xmm2, xmm0
jbe 0x10031da4
comiss xmm0, xmm1
jbe 0x10031da4
mov dword [edi + 0xc], 2
mov byte [edi + 0x20], 0
mov eax, dword [edi + 0xc]
cmp eax, 1
jne 0x10031e8f
cmp byte [0x102f77c8], 0
jne 0x10031dd3
mov byte [edi + 0x20], 0
cmp dword [0x10104498], eax
jge 0x10031dcc
mov dword [edi + 8], 0
mov byte [0x102f77c8], 1
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
call eax
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x10]
lea esi, [ecx + ecx*2]
mov ecx, dword [eax]
mov dword [edx + esi*4], ecx
mov ecx, dword [eax + 4]
mov dword [edx + esi*4 + 4], ecx
mov eax, dword [eax + 8]
mov dword [edx + esi*4 + 8], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi]
mov esi, dword [esp + 0x20]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x24]
mov dword [ecx + edx*4 + 0x18], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x20]
mov dword [ecx + edx*4 + 0x14], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x1c]
mov dword [ecx + edx*4 + 0x10], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x18]
mov dword [ecx + edx*4 + 0xc], eax
mov eax, dword [edi + 8]
movss xmm0, dword [ebp + 0x10]
lea ecx, [eax + eax*8]
mov eax, dword [edi]
movss dword [eax + ecx*4], xmm0
movss xmm0, dword [ebp + 0x14]
movss dword [eax + ecx*4 + 4], xmm0
movss xmm0, dword [ebp + 0x18]
movss dword [eax + ecx*4 + 8], xmm0
mov eax, dword [edi + 8]
mov ecx, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x30]
mov dword [ecx + edx*4 + 0x20], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0x2c]
mov dword [ecx + edx*4 + 0x1c], eax
mov eax, dword [edi + 8]
mov dword [edi + 0x14], eax
inc eax
mov dword [edi + 8], eax
mov eax, dword [edi + 0xc]
jmp 0x10031e9a
mov esi, dword [esp + 0x20]
mov byte [0x102f77c8], 0
cmp eax, 2
jne 0x100322cd
cmp byte [0x102f77c9], 0
jne 0x10031ec2
mov dword [edi + 8], 0
xor ecx, ecx
mov byte [edi + 0x20], 0
mov byte [0x102f77c9], 1
jmp 0x10031ec5
mov ecx, dword [edi + 8]
mov eax, dword [0x10104498]
test eax, eax
jle 0x10031ed9
cmp ecx, eax
jl 0x10031ed9
mov dword [edi + 0xc], 1
cmp ecx, dword [edi + 0x14]
jl 0x10031eee
xor eax, eax
mov edx, 3
cmp byte [edi + 0x18], al
cmovne eax, edx
mov dword [edi + 0xc], eax
mov eax, dword [edi]
lea ecx, [ecx + ecx*8]
mov eax, dword [eax + ecx*4 + 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [edi + 8]
lea ecx, [eax + eax*8]
mov eax, dword [edi]
mov eax, dword [eax + ecx*4 + 0x14]
mov dword [esi + 0x20], eax
mov eax, dword [edi + 8]
lea ecx, [eax + eax*8]
mov eax, dword [edi]
movss xmm3, dword [eax + ecx*4 + 0x10]
movss dword [esi + 0x1c], xmm3
mov eax, dword [edi + 8]
lea ecx, [eax + eax*8]
mov eax, dword [edi]
movss xmm2, dword [eax + ecx*4 + 0xc]
movss dword [esi + 0x18], xmm2
movaps xmm1, xmm2
mov eax, dword [edi + 8]
mulss xmm1, xmm2
lea ecx, [eax + eax*8]
mov eax, dword [edi]
movss xmm5, dword [eax + ecx*4]
movss dword [ebp + 0x10], xmm5
movss xmm4, dword [eax + ecx*4 + 4]
movss dword [ebp + 0x14], xmm4
movss xmm0, dword [eax + ecx*4 + 8]
movss dword [ebp + 0x18], xmm0
movss dword [esp + 0x34], xmm0
movaps xmm0, xmm3
mulss xmm0, xmm3
mov eax, dword [eax + ecx*4 + 0x20]
mov dword [esi + 0x30], eax
mov eax, dword [edi + 8]
addss xmm1, xmm0
movss dword [esp + 0x1c], xmm5
xorps xmm0, xmm0
movss dword [esp + 0x20], xmm4
lea ecx, [eax + eax*8]
mov eax, dword [edi]
sqrtss xmm0, xmm1
mov eax, dword [eax + ecx*4 + 0x1c]
mov dword [esi + 0x2c], eax
cvtps2pd xmm1, xmm2
movss dword [esp + 0x2c], xmm0
movaps xmm0, xmm5
cvtps2pd xmm2, xmm3
unpcklps xmm0, xmm4
movq qword [ebp + 0x10], xmm0
movq qword [esp + 0x64], xmm0
movsd xmm0, qword [esp + 0x38]
ucomisd xmm2, xmm0
lahf
test ah, 0x44
jp 0x10031fcf
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x10031ff5
movaps xmm0, xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [esp + 0x48]
movsd xmm1, qword [esp + 0x38]
movss xmm4, dword [esp + 0x20]
comisd xmm1, xmm0
jbe 0x10031ff5
addsd xmm0, qword [esp + 0x50]
movss xmm2, dword [0x10104494]
movss xmm5, dword [0x10046910]
subss xmm4, xmm2
comiss xmm2, xmm5
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x20], xmm4
movss dword [esp + 0x30], xmm0
movaps xmm0, xmm2
mulss xmm0, dword [0x10046674]
movss dword [ebp + 0x14], xmm4
movss dword [esp + 0x14], xmm0
ja 0x1003204b
movss xmm3, dword [0x10046a04]
comiss xmm3, xmm2
ja 0x1003204b
movss xmm1, dword [0x1004694c]
jmp 0x100320ba
xorps xmm3, xmm3
comiss xmm3, xmm0
jbe 0x10032064
movaps xmm0, xmm2
mulss xmm0, dword [0x100469b8]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm2, dword [0x10104494]
xorps xmm0, xmm0
movss xmm1, dword [0x1004694c]
add esp, 4
movss xmm4, dword [esp + 0x20]
movss xmm3, dword [0x10046a04]
movss xmm5, dword [0x10046910]
comiss xmm0, xmm2
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
mulss xmm0, xmm1
jbe 0x100320b6
addss xmm2, xmm0
jmp 0x100320ba
subss xmm2, xmm0
comiss xmm2, dword [0x100468c0]
ja 0x100320d0
movss xmm0, dword [0x100469f4]
comiss xmm0, xmm2
jbe 0x100320e8
cmp byte [0x10104492], 0
je 0x100320e8
movss xmm0, dword [0x100468bc]
movss dword [ebp + 0x10], xmm0
jmp 0x100320ee
movss xmm0, dword [esp + 0x1c]
cmp byte [0x10104491], 0
je 0x1003211a
movq xmm0, qword [esp + 0x58]
mov eax, dword [esp + 0x44]
movq qword [ebp + 0x10], xmm0
movss xmm4, dword [ebp + 0x14]
movss xmm0, dword [ebp + 0x10]
mov dword [ebp + 0x18], eax
movss xmm2, dword [ebp + 0x18]
jmp 0x10032120
movss xmm2, dword [esp + 0x34]
comiss xmm0, xmm5
jbe 0x1003212e
subss xmm0, xmm1
movss dword [ebp + 0x10], xmm0
comiss xmm3, xmm0
jbe 0x1003213c
addss xmm0, xmm1
movss dword [ebp + 0x10], xmm0
comiss xmm4, xmm5
jbe 0x1003214a
subss xmm4, xmm1
movss dword [ebp + 0x14], xmm4
comiss xmm3, xmm4
jbe 0x10032158
addss xmm4, xmm1
movss dword [ebp + 0x14], xmm4
comiss xmm2, xmm5
jbe 0x10032166
subss xmm2, xmm1
movss dword [ebp + 0x18], xmm2
comiss xmm3, xmm2
jbe 0x10032174
addss xmm2, xmm1
movss dword [ebp + 0x18], xmm2
mov ecx, dword [0x100d1558]
lea edx, [ebp + 0x10]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x50]
call eax
movss xmm1, dword [ebp + 0x14]
subss xmm1, dword [esp + 0x68]
comiss xmm1, dword [0x10046910]
movaps xmm2, xmm1
movss dword [esp + 0x1c], xmm1
mulss xmm2, dword [0x10046674]
movss dword [esp + 0x14], xmm2
ja 0x100321c2
movss xmm0, dword [0x10046a04]
comiss xmm0, xmm1
ja 0x100321c2
xorps xmm3, xmm3
jmp 0x1003221d
xorps xmm0, xmm0
comiss xmm0, xmm2
jbe 0x100321db
movaps xmm0, xmm1
mulss xmm0, dword [0x100469b8]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [esp + 0x20]
xorps xmm3, xmm3
fstp dword [esp + 0x18]
movss xmm0, dword [esp + 0x18]
add esp, 4
comiss xmm3, xmm1
mulss xmm0, dword [0x1004694c]
jbe 0x10032211
addss xmm1, xmm0
jmp 0x10032215
subss xmm1, xmm0
movss xmm0, dword [0x10046a04]
addss xmm1, dword [esp + 0x30]
comiss xmm1, dword [0x10046910]
movaps xmm2, xmm1
movss dword [esp + 0x1c], xmm1
mulss xmm2, dword [0x10046674]
movss dword [esp + 0x14], xmm2
ja 0x10032248
comiss xmm0, xmm1
jbe 0x10032298
comiss xmm3, xmm2
jbe 0x1003225e
movaps xmm0, xmm1
mulss xmm0, dword [0x100469b8]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [esp + 0x20]
xorps xmm0, xmm0
add esp, 4
comiss xmm0, xmm1
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
mulss xmm0, dword [0x1004694c]
jbe 0x10032294
addss xmm1, xmm0
jmp 0x10032298
subss xmm1, xmm0
mulss xmm1, dword [0x10046690]
movaps xmm0, xmm1
call fcn.10039020
movaps xmm1, xmm0
shufps xmm1, xmm0, 1
mulss xmm1, dword [esp + 0x2c]
mulss xmm0, dword [esp + 0x2c]
movss dword [esi + 0x18], xmm1
movss dword [esi + 0x1c], xmm0
inc dword [edi + 8]
mov eax, dword [edi + 0xc]
jmp 0x100322d4
mov byte [0x102f77c9], 0
test eax, eax
jne 0x100322ef
cmp byte [0x102f77ca], al
jne 0x10032300
mov dword [edi + 8], eax
mov byte [edi + 0x20], al
mov byte [0x102f77ca], 1
jmp 0x10032300
mov byte [0x102f77ca], 0
cmp eax, 2
je 0x1003230a
cmp eax, 1
je 0x1003230a
mov dword [0x10104498], 0
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
xor ecx, esp
call fcn.10037c8d
mov esp, ebp
pop ebp
ret 0x14