Function at 0x180018020
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbx
push rsi
push rdi
sub rsp, 0xa0
mov rbx, qword [0x1800660e8]
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], r13
mov qword [rax - 0x20], r14
mov edi, dword [rbx + 0x5be0]
sub edi, 1
movaps xmmword [rax - 0x38], xmm6
movaps xmmword [rax - 0x48], xmm7
movaps xmmword [rax - 0x58], xmm8
movaps xmmword [rax - 0x68], xmm9
movaps xmmword [rax - 0x78], xmm10
js 0x1800180c3
movsxd rsi, edi
shl rsi, 5
mov rbp, rsi
nop dword [rax]
mov rdx, qword [rbx + 0x5be8]
cmp dword [rdx + rsi + 4], 7
jne 0x1800180b6
movsxd r8, dword [rbx + 0x5be0]
mov rcx, rdx
sub rdx, rdx
add rdx, rbp
sar rdx, 5
sub r8, rdx
mov rax, rdx
shl rax, 5
add rcx, rax
shl r8, 5
sub r8, 0x20
lea rdx, [rcx + 0x20]
call sub.VCRUNTIME140.dll_memmove
dec dword [rbx + 0x5be0]
sub rbp, 0x20
sub rsi, 0x20
sub edi, 1
jns 0x180018070
xor edi, edi
mov esi, edi
cmp dword [rbx + 0x5be0], edi
jle 0x1800180fd
mov ebp, edi
mov rax, qword [rbx + 0x5be8]
cmp dword [rax + rbp + 4], edi
jne 0x1800180ef
movsxd rdx, esi
mov rcx, rbx
shl rdx, 5
add rdx, rax
call qword [rax + rbp + 0x10]
inc esi
add rbp, 0x20
cmp esi, dword [rbx + 0x5be0]
jl 0x1800180d1
mov rsi, qword [0x1800660e8]
cmp byte [rsi + 0x7e], dil
je 0x180018114
test byte [rsi + 0xc], 2
jne 0x180018114
mov byte [rsi + 0x7e], dil
cmp byte [rsi + 0x5b99], dil
jne 0x18001817a
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x180018173
lea r8, [rsp + 0xc0]
mov qword [rsp + 0xc0], rdi
call fcn.180013d20
mov rbp, rax
test rax, rax
je 0x180018173
mov rdx, qword [rsp + 0xc0]
test rdx, rdx
je 0x180018158
mov rcx, rax
call fcn.180028700
mov rcx, qword [0x1800660e8]
test rcx, rcx
je 0x18001816a
dec dword [rcx + 0xf4]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov byte [rsi + 0x5b99], 1
movss xmm0, dword [rsi + 0x5b9c]
xorps xmm10, xmm10
comiss xmm0, xmm10
jbe 0x180018219
subss xmm0, dword [rsi + 0x18]
comiss xmm10, xmm0
movss dword [rsi + 0x5b9c], xmm0
jb 0x180018219
mov rbp, qword [rsi + 0x20]
test rbp, rbp
je 0x18001820c
mov rax, qword [0x1800660e8]
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0xc0], rdi
mov dword [rax + 0x5b9c], edi
call fcn.180028970
lea rdx, [0x18005284c]
mov rcx, rbp
mov r14, rax
call fcn.180013bd0
mov rbp, rax
test rax, rax
je 0x180018213
mov r8, qword [rsp + 0xc0]
mov r9, rax
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x180018213
mov byte [rsi + 0xdc], 1
mov dword [rsi + 0x5b9c], edi
movss xmm0, dword [rbx + 0x18]
lea rcx, [rbx + 0x5b68]
inc dword [rbx + 0x3e38]
xor edx, edx
cvtps2pd xmm0, xmm0
mov byte [rbx + 0x3e44], 1
mov word [rbx + 0x5b52], di
mov dword [rbx + 0x3ea8], edi
addsd xmm0, qword [rbx + 0x3e30]
movsd qword [rbx + 0x3e30], xmm0
call fcn.18002a920
movsxd rax, dword [rbx + 0x5dd0]
movss xmm1, dword [rbx + 0x18]
movss xmm8, dword [0x18005b810]
movaps xmm0, xmm1
movss xmm9, dword [0x18005b6bc]
subss xmm0, dword [rbx + rax*4 + 0x5ce0]
addss xmm0, dword [rbx + 0x5dd8]
movss dword [rbx + 0x5dd8], xmm0
movss dword [rbx + rax*4 + 0x5ce0], xmm1
mov eax, 0x88888889
mov ecx, dword [rbx + 0x5dd0]
movss xmm2, dword [rbx + 0x5dd8]
inc ecx
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3c
sub ecx, eax
mov eax, dword [rbx + 0x5dd4]
inc eax
mov dword [rbx + 0x5dd0], ecx
mov ecx, 0x3c
cmp eax, ecx
cmovl ecx, eax
comiss xmm2, xmm10
mov dword [rbx + 0x5dd4], ecx
jbe 0x1800182fd
movd xmm0, ecx
movaps xmm1, xmm9
cvtdq2ps xmm0, xmm0
divss xmm2, xmm0
divss xmm1, xmm2
jmp 0x180018301
movaps xmm1, xmm8
lea rcx, [rbx + 0x37d0]
movss dword [rbx + 0xe0], xmm1
call fcn.18002a400
movzx ecx, byte [rbx + 0x7a]
call fcn.180021c60
mov rbp, qword [0x1800660e8]
mov r8d, edi
mov rax, qword [rbp + 0x4890]
mov rcx, qword [rax]
mov qword [rcx], 5
mov dword [rcx + 8], edi
movsd xmm0, qword [rbp + 0x10]
movsd qword [rcx + 0xc], xmm0
cmp dword [rbp + 0x4888], edi
jle 0x18001840a
mov rdx, rdi
nop word [rax + rax]
mov rax, qword [rbp + 0x4890]
movaps xmm3, xmm10
inc r8d
mov rcx, qword [rdx + rax]
add rdx, 8
movsd xmm4, qword [rcx + 0xa8]
movsd xmm2, qword [rcx + 0xb0]
movaps xmm1, xmm4
addss xmm1, dword [rcx + 4]
movsd qword [rcx + 0xa0], xmm2
movaps xmm0, xmm4
shufps xmm0, xmm0, 0x55
addss xmm0, dword [rcx + 8]
mov qword [rcx + 0xb0], rdi
movss dword [rcx + 0x14], xmm1
movss xmm1, dword [rcx + 0xc]
mov qword [rcx + 0xa8], rdi
subss xmm1, xmm4
movss dword [rcx + 0x18], xmm0
movaps xmm0, xmm4
shufps xmm0, xmm0, 0x55
movsd qword [rcx + 0x98], xmm4
addss xmm1, xmm2
movss xmm2, dword [rcx + 0x10]
subss xmm2, xmm0
movaps xmm0, xmm10
maxss xmm3, xmm1
addss xmm2, dword [rcx + 0xa4]
movss dword [rcx + 0x1c], xmm3
maxss xmm0, xmm2
movss dword [rcx + 0x20], xmm0
cmp r8d, dword [rbp + 0x4888]
jl 0x180018360
mov rax, qword [rbx + 0x58]
mov byte [rax + 0x18], 1
mov rcx, qword [rbp + 0x68]
test rcx, rcx
jne 0x180018426
mov rax, qword [rbp + 0x58]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx]
call fcn.18001f9e0
mov eax, dword [rbx + 0x4888]
movaps xmm2, xmm8
movss xmm5, dword [0x18005b84c]
movaps xmm7, xmm8
movaps xmm6, xmm5
test eax, eax
jle 0x1800184a7
mov rcx, qword [rbx + 0x4890]
mov edx, eax
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rcx]
movss xmm4, dword [rax + 4]
comiss xmm2, xmm4
movss xmm3, dword [rax + 8]
movaps xmm0, xmm4
addss xmm0, dword [rax + 0xc]
movaps xmm1, xmm3
addss xmm1, dword [rax + 0x10]
jbe 0x180018485
movaps xmm2, xmm4
comiss xmm7, xmm3
jbe 0x18001848d
movaps xmm7, xmm3
comiss xmm0, xmm5
jbe 0x180018495
movaps xmm5, xmm0
comiss xmm1, xmm6
jbe 0x18001849d
movaps xmm6, xmm1
add rcx, 8
sub rdx, 1
jne 0x180018460
mov eax, dword [rbx + 0x38b4]
movss xmm1, dword [rbx + 0x38b8]
shufps xmm2, xmm2, 0xe1
movss xmm2, xmm7
mov dword [rbx + 0x3c34], eax
shufps xmm2, xmm2, 0xc6
movss xmm2, xmm5
mov qword [rsp + 0x90], r15
movaps xmm7, xmmword [rsp + 0x70]
shufps xmm2, xmm2, 0x27
movss xmm2, xmm6
shufps xmm2, xmm2, 0x39
movups xmmword [rbx + 0x3c3c], xmm2
movss xmm0, dword [rbx + 0x3c38]
ucomiss xmm0, xmm1
movups xmmword [rsp + 0x20], xmm2
jp 0x180018503
je 0x1800185b6
movss xmm6, dword [0x18005b728]
lea r14, [rbx + 0x3de4]
movss dword [rbx + 0x3c38], xmm1
mov esi, edi
mov r15d, 0x200
movd xmm0, esi
cvtdq2ps xmm0, xmm0
test esi, esi
je 0x18001857b
movss xmm1, dword [rbx + 0x3c38]
minss xmm1, xmm0
divss xmm1, xmm0
movaps xmm0, xmm9
subss xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_acosf
movaps xmm1, xmm6
divss xmm1, xmm0
movaps xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
cvttss2si eax, xmm0
inc eax
cdq
sub eax, edx
sar eax, 1
add eax, eax
cmp eax, 4
jge 0x180018572
mov eax, 4
jmp 0x180018580
cmp eax, r15d
cmovg eax, r15d
jmp 0x180018580
mov eax, 0x30
mov byte [r14], al
inc esi
inc r14
cmp esi, 0x40
jl 0x180018522
movss xmm0, dword [0x18005b658]
call sub.api_ms_win_crt_math_l1_1_0.dll_cosf
movss xmm1, dword [rbx + 0x3c38]
movaps xmm2, xmm9
subss xmm2, xmm0
divss xmm1, xmm2
movss dword [rbx + 0x3de0], xmm1
mov r8d, edi
movaps xmm6, xmmword [rsp + 0x80]
mov dword [rbx + 0x3c4c], edi
cmp byte [rbx + 0x38b0], dil
je 0x1800185e0
mov dword [rbx + 0x3c4c], 1
mov r8d, 1
mov edx, r8d
cmp byte [rbx + 0x38b1], dil
je 0x180018605
mov rax, qword [rbx + 0x3c10]
mov rcx, qword [rax + 0x40]
test byte [rcx], 4
jne 0x180018605
or edx, 2
mov dword [rbx + 0x3c4c], edx
cmp byte [rbx + 0x38b2], dil
je 0x180018617
or edx, 4
mov dword [rbx + 0x3c4c], edx
test byte [rbx + 0xc], 8
je 0x180018626
or edx, 8
mov dword [rbx + 0x3c4c], edx
mov edx, edi
cmp dword [rbx + 0x4888], edi
jle 0x180018669
mov r8, rdi
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x4890]
lea r8, [r8 + 8]
xorps xmm0, xmm0
inc edx
mov rcx, qword [rax + r8 - 8]
movups xmmword [rcx + 0x48], xmm0
movups xmmword [rcx + 0x58], xmm0
movups xmmword [rcx + 0x68], xmm0
cmp edx, dword [rbx + 0x4888]
jl 0x180018640
cmp byte [rbx + 0x4a44], dil
je 0x18001869d
mov eax, dword [rbx + 0x4a64]
cmp eax, dword [rbx + 0x3f18]
jne 0x18001869d
cmp dword [rbp + 0x3f18], eax
jne 0x18001868e
mov dword [rbp + 0x3f1c], eax
cmp dword [rbp + 0x3f48], eax
jne 0x18001869d
mov byte [rbp + 0x3f4c], 1
cmp dword [rbx + 0x3f08], edi
jne 0x1800186ad
mov dword [rbx + 0x3f10], edi
jmp 0x1800186bf
mov eax, dword [rbx + 0x3f04]
test eax, eax
je 0x1800186c5
cmp dword [rbx + 0x3f18], eax
jne 0x1800186c5
mov dword [rbx + 0x3f14], edi
mov eax, dword [rbx + 0x3f04]
test eax, eax
je 0x1800186ff
movss xmm1, dword [rbx + 0x18]
movaps xmm0, xmm1
addss xmm0, dword [rbx + 0x3f10]
movss dword [rbx + 0x3f10], xmm0
cmp dword [rbx + 0x3f18], eax
je 0x1800186ff
addss xmm1, dword [rbx + 0x3f14]
movss dword [rbx + 0x3f14], xmm1
mov dword [rbx + 0x3f08], eax
mov eax, dword [rbx + 0x3f18]
mov dword [rbx + 0x3f04], edi
mov word [rbx + 0x3f0c], di
test eax, eax
je 0x18001874d
cmp dword [rbx + 0x3f1c], eax
je 0x18001874d
cmp dword [rbx + 0x3f48], eax
jne 0x18001874d
test byte [rbx + 0x5c74], 1
je 0x180018741
lea rcx, [0x180059fd0]
call fcn.1800294a0
call fcn.180017400
mov rbp, qword [0x1800660e8]
mov ecx, dword [rbx + 0x3f18]
test ecx, ecx
je 0x18001876c
movss xmm0, dword [rbx + 0x18]
addss xmm0, dword [rbx + 0x3f20]
movss dword [rbx + 0x3f20], xmm0
mov rax, qword [rbx + 0x3f38]
movss xmm0, dword [rbx + 0x18]
addss xmm0, dword [rbx + 0x3f5c]
mov qword [rbx + 0x3f50], rax
movzx eax, byte [rbx + 0x3f28]
mov byte [rbx + 0x3f4d], al
mov eax, dword [rbx + 0x5ad8]
movss dword [rbx + 0x3f5c], xmm0
mov dword [rbx + 0x3f48], ecx
mov dword [rbx + 0x3f1c], edi
mov byte [rbx + 0x3f29], dil
mov byte [rbx + 0x3f4c], dil
mov byte [rbx + 0x3f24], dil
test eax, eax
je 0x1800187d1
cmp ecx, eax
je 0x1800187d1
mov dword [rbx + 0x5ad8], edi
test ecx, ecx
jne 0x1800187ea
mov dword [rbx + 0x4728], edi
mov byte [rbx + 0x472c], dil
mov dword [rbx + 0x4730], edi
jmp 0x180018811
mov eax, dword [rbx + 0x4730]
test eax, eax
je 0x180018811
test al, 2
je 0x180018811
mov eax, dword [rbx + 0x3f18]
mov dword [rbp + 0x400c], eax
mov dword [rbp + 0x4008], eax
mov word [rbp + 0x4010], di
mov eax, dword [rbx + 0x4bb8]
movss xmm0, dword [rbx + 0x4bc0]
mov dword [rbx + 0x4bbc], eax
test eax, eax
je 0x180018844
addss xmm0, dword [rbx + 0x18]
mov dword [rbx + 0x4bc4], edi
mov dword [rbx + 0x4bb8], edi
movss dword [rbx + 0x4bc0], xmm0
jmp 0x18001887e
comiss xmm0, xmm10
jbe 0x18001887e
movss xmm2, dword [rbx + 0x18]
movss xmm0, dword [0x18005b664]
movaps xmm1, xmm2
addss xmm1, dword [rbx + 0x4bc4]
addss xmm2, xmm2
movss dword [rbx + 0x4bc4], xmm1
maxss xmm0, xmm2
comiss xmm1, xmm0
jb 0x18001887e
mov qword [rbx + 0x4bc0], rdi
mov eax, dword [rbx + 0x4ab4]
mov dword [rbx + 0x4ab8], eax
mov qword [rbx + 0x4ab0], 0x7f7fffff
mov word [rbx + 0x4a45], di
mov dword [rbx + 0x4ac0], edi
call fcn.180020810
call fcn.180025690
call fcn.180020f80
call fcn.180017be0
mov r10, qword [0x1800660e8]
mov rcx, qword [r10 + 0x3ed0]
test rcx, rcx
je 0x18001898b
mov eax, dword [r10 + 0x3f18]
mov dword [r10 + 0x3f1c], eax
cmp dword [r10 + 0x3f48], eax
jne 0x1800188ec
mov byte [r10 + 0x3f4c], 1
mov r9, qword [rcx + 0x370]
cmp byte [r10 + 0xe04], dil
je 0x180018982
lea rax, [r10 + 0xdfc]
mov rcx, rax
test rax, rax
jne 0x180018916
lea rcx, [r10 + 0xdfc]
movss xmm0, dword [rcx]
movss xmm1, dword [0x18005b848]
comiss xmm0, xmm1
movss xmm2, dword [rcx + 4]
jb 0x180018982
comiss xmm2, xmm1
jb 0x180018982
movss xmm0, dword [rax]
lea rdx, [rsp + 0xc0]
movss xmm1, dword [rax + 4]
mov r8d, 1
subss xmm0, dword [r10 + 0x3f2c]
subss xmm1, dword [r10 + 0x3f30]
mov rcx, r9
movss dword [rsp + 0xc0], xmm0
movss dword [rsp + 0xc4], xmm1
call fcn.18001fbc0
mov rcx, qword [r10 + 0x3ed0]
call fcn.18001f6c0
jmp 0x1800189c9
mov qword [r10 + 0x3ed0], rdi
jmp 0x1800189c4
mov rcx, qword [r10 + 0x3f38]
test rcx, rcx
je 0x1800189c9
mov eax, dword [r10 + 0x3f18]
cmp dword [rcx + 0x74], eax
jne 0x1800189c9
mov dword [r10 + 0x3f1c], eax
cmp dword [r10 + 0x3f48], eax
jne 0x1800189bb
mov byte [r10 + 0x3f4c], 1
cmp byte [r10 + 0xe04], dil
jne 0x1800189c9
call fcn.180017400
mov r8, qword [0x1800660e8]
mov eax, dword [r8 + 0x4860]
sub eax, 1
js 0x180018a0c
mov r8, qword [r8 + 0x4868]
movsxd rdx, eax
add r8, 8
imul rcx, rdx, 0x38
add r8, rcx
mov rax, qword [r8]
test rax, rax
je 0x180018a02
test dword [rax + 0xc], 0x8000000
jne 0x180018a23
sub r8, 0x38
sub rdx, 1
jns 0x1800189f1
cmp qword [rbx + 0x4a08], rdi
je 0x180018a3f
movss xmm0, dword [rbx + 0x4a24]
comiss xmm0, xmm10
jbe 0x180018a3f
movss xmm1, dword [rbx + 0x18]
mulss xmm1, dword [0x18005b75c]
addss xmm1, dword [rbx + 0x4a3c]
minss xmm1, xmm9
jmp 0x180018a5d
movss xmm0, dword [rbx + 0x18]
mulss xmm0, dword [0x18005b770]
movss xmm1, dword [rbx + 0x4a3c]
subss xmm1, xmm0
maxss xmm1, xmm10
movss dword [rbx + 0x4a3c], xmm1
mov r13d, 0xffffffff
movups xmm0, xmmword [rbx + 0x5b78]
mov dword [rbx + 0x4a40], edi
mov qword [rbx + 0x5de0], 0xffffffffffffffff
movups xmmword [rbx + 0x5b88], xmm0
mov dword [rbx + 0x5ddc], r13d
mov byte [rbx + 0x5b78], dil
call fcn.180021420
movaps xmm9, xmmword [rsp + 0x50]
cmp byte [rbx + 0x3e47], dil
jne 0x180018acd
movss xmm0, dword [rbx + 0x80]
comiss xmm10, xmm0
ja 0x180018acd
movsd xmm8, qword [rbx + 0x3e30]
cvtpd2ps xmm8, xmm8
subss xmm8, xmm0
mov ebp, edi
cmp dword [rbx + 0x3e58], edi
je 0x180018c44
mov r14, rdi
nop
mov rax, qword [rbx + 0x3e60]
mov rsi, qword [r14 + rax]
movzx ecx, byte [rsi + 0xae]
movzx eax, word [rsi + 0xba]
mov byte [rsi + 0xaf], cl
mov byte [rsi + 0xae], dil
mov byte [rsi + 0xb0], dil
mov word [rsi + 0xbc], ax
mov word [rsi + 0xba], di
test cl, cl
jne 0x180018c32
cmp byte [rsi + 0x3cc], dil
jne 0x180018c32
comiss xmm8, dword [rsi + 0x25c]
jbe 0x180018c32
mov rcx, qword [rsi + 0x290]
mov byte [rsi + 0x3cc], 1
mov eax, dword [rcx + 0x14]
mov dword [rsi + 0x3c4], eax
mov eax, dword [rcx + 0x24]
mov dword [rsi + 0x3c8], eax
mov rcx, qword [rsi + 0xf0]
test rcx, rcx
je 0x180018b90
mov rax, qword [0x1800660e8]
mov qword [rsi + 0xe8], rdi
test rax, rax
je 0x180018b83
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0xf0], rdi
mov rcx, qword [rsi + 0x290]
call fcn.180032c40
mov rcx, qword [rsi + 0x190]
test rcx, rcx
je 0x180018bce
mov rax, qword [0x1800660e8]
mov qword [rsi + 0x188], rdi
test rax, rax
je 0x180018bc1
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x190], rdi
mov rcx, qword [rsi + 0x1c8]
test rcx, rcx
je 0x180018c00
mov rax, qword [0x1800660e8]
mov qword [rsi + 0x1c0], rdi
test rax, rax
je 0x180018bf3
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x1c8], rdi
mov rcx, qword [rsi + 0x1d8]
test rcx, rcx
je 0x180018c32
mov rax, qword [0x1800660e8]
mov qword [rsi + 0x1d0], rdi
test rax, rax
je 0x180018c25
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x1d8], rdi
inc ebp
add r14, 8
cmp ebp, dword [rbx + 0x3e58]
jne 0x180018ae0
mov r14d, edi
cmp dword [rbx + 0x4b48], edi
jle 0x180018d7b
mov qword [rsp + 0xd0], r12
mov r15, rdi
mov r12, rdi
mov rax, qword [rbx + 0x4b50]
movss xmm0, dword [r15 + rax]
comiss xmm0, xmm10
jb 0x180018d58
comiss xmm8, xmm0
jbe 0x180018d58
mov rsi, qword [rbx + 0x4b28]
mov rbp, qword [0x1800660e8]
add rsi, r12
mov qword [rsi + 0x1e0], rdi
mov rcx, qword [rsi + 0x1d8]
test rcx, rcx
je 0x180018cc5
mov qword [rsi + 0x1d0], rdi
test rbp, rbp
je 0x180018cb8
dec dword [rbp + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x1d8], rdi
mov byte [rsi + 0x225], 1
mov rcx, qword [rsi + 0x190]
test rcx, rcx
je 0x180018cfe
mov rax, qword [0x1800660e8]
mov qword [rsi + 0x188], rdi
test rax, rax
je 0x180018cf1
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x190], rdi
mov edx, edi
mov byte [rsi + 0x231], 1
cmp dword [rsi + 0x6c], edi
jle 0x180018d25
mov rcx, rdi
nop
mov rax, qword [rsi + 0x18]
lea rcx, [rcx + 0x70]
inc edx
mov word [rax + rcx - 0x20], r13w
cmp edx, dword [rsi + 0x6c]
jl 0x180018d10
sub rsi, qword [rbp + 0x4b28]
movabs rax, 0x73615a240e6c2b45
imul rsi
sar rdx, 8
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, qword [rbp + 0x4b50]
movsxd rcx, edx
mov dword [rax + rcx*4], 0xbf800000
inc r14d
add r15, 4
add r12, 0x238
cmp r14d, dword [rbx + 0x4b48]
jl 0x180018c61
mov r12, qword [rsp + 0xd0]
mov r14d, edi
mov r15, qword [rsp + 0x90]
mov r13, qword [rsp + 0xd8]
cmp dword [rbx + 0x4b10], edi
jle 0x180018ddd
mov rsi, rdi
nop dword [rax]
mov rbp, qword [rbx + 0x4b18]
movss xmm0, dword [rsi + rbp + 4]
comiss xmm0, xmm10
jb 0x180018dcd
comiss xmm8, xmm0
jbe 0x180018dcd
lea rcx, [rbp + 0x10]
add rcx, rsi
call fcn.180035fd0
mov dword [rsi + rbp + 4], 0xbf800000
inc r14d
add rsi, 0x70
cmp r14d, dword [rbx + 0x4b10]
jl 0x180018da0
movaps xmm10, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x60]
cmp byte [rbx + 0x3e47], dil
je 0x180018e5b
mov rsi, qword [0x1800660e8]
mov rcx, qword [rsi + 0x4848]
test rcx, rcx
je 0x180018e24
mov qword [rsi + 0x4840], rdi
test rsi, rsi
je 0x180018e17
dec dword [rsi + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x4848], rdi
mov rcx, qword [rsi + 0x4858]
test rcx, rcx
je 0x180018e56
mov rax, qword [0x1800660e8]
mov qword [rsi + 0x4850], rdi
test rax, rax
je 0x180018e49
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi + 0x4858], rdi
call fcn.18003da00
mov rax, qword [rbx + 0x4898]
mov byte [rbx + 0x3e47], dil
test rax, rax
je 0x180018ecc
cmp byte [rax + 0xaf], dil
jne 0x180018ecc
mov rcx, qword [0x1800660e8]
mov eax, dword [rcx + 0x3e68]
sub eax, 1
js 0x180018ec5
movsxd rdx, eax
mov rax, qword [rcx + 0x3e70]
lea r8, [rax + rdx*8]
mov rcx, qword [r8]
test rcx, rcx
je 0x180018ebb
cmp byte [rcx + 0xaf], dil
je 0x180018ebb
mov eax, dword [rcx + 0xc]
and eax, 0x40200
cmp eax, 0x40200
jne 0x180018ff7
sub r8, 8
sub rdx, 1
jns 0x180018e97
xor ecx, ecx
call fcn.18001f6c0
mov ecx, dword [rbx + 0x3e8c]
test ecx, ecx
jns 0x180018ef2
mov eax, ecx
cdq
sub eax, edx
mov edx, edi
sar eax, 1
add eax, ecx
lea rcx, [rbx + 0x3e88]
test eax, eax
cmovg edx, eax
call fcn.18002aea0
mov dword [rbx + 0x3e88], edi
mov ecx, dword [rbx + 0x4874]
test ecx, ecx
jns 0x180018f1e
mov eax, ecx
cdq
sub eax, edx
mov edx, edi
sar eax, 1
add eax, ecx
lea rcx, [rbx + 0x4870]
test eax, eax
cmovg edx, eax
call fcn.18002ae10
lea rsi, [rbx + 0x4840]
mov dword [rbx + 0x4870], edi
mov ecx, dword [rsi + 4]
test ecx, ecx
jns 0x180018f4a
mov eax, ecx
cdq
sub eax, edx
mov edx, edi
sar eax, 1
add eax, ecx
mov rcx, rsi
test eax, eax
cmovg edx, eax
call fcn.18002afd0
mov dword [rsi], edi
cmp dword [rsi + 4], edi
jne 0x180018f5e
mov edx, 8
mov rcx, rsi
call fcn.18002afd0
movsxd rcx, dword [rsi]
xor edx, edx
mov rax, qword [rsi + 8]
mov dword [rax + rcx*4], edi
lea rcx, [rbx + 0x4850]
inc dword [rsi]
call fcn.180029fb0
mov rsi, qword [0x1800660e8]
mov dword [rsi + 0x5ca4], edi
cmp byte [rsi + 0x5ca1], dil
je 0x180019106
mov ebp, dword [rsi + 0x3f08]
xor edx, edx
mov ecx, 0x20e
mov dword [rsi + 0x4a40], 7
mov r8d, 1
call fcn.180020550
test al, al
je 0x180018fbf
mov byte [rsi + 0x5ca1], dil
mov r14d, dword [rsi + 0xe18]
xor r8d, r8d
xor edx, edx
cmp r14d, 0x3000
je 0x180019017
movzx ecx, byte [rsi + 0x5ca2]
call fcn.180020690
test al, al
je 0x18001905d
test ebp, ebp
je 0x18001905d
mov dword [rsi + 0x5ca4], ebp
mov byte [rsi + 0x5ca1], dil
jmp 0x18001905d
mov rax, qword [rcx + 0x390]
test rax, rax
je 0x18001900c
cmp byte [rax + 0xaf], dil
jne 0x18001900f
mov rax, rcx
mov rcx, rax
jmp 0x180018ec7
xor ecx, ecx
call fcn.180020690
test al, al
je 0x180019029
mov byte [rsi + 0x5ca2], dil
xor r8d, r8d
xor edx, edx
mov ecx, 1
call fcn.180020690
test al, al
je 0x180019043
mov byte [rsi + 0x5ca2], 1
xor r8d, r8d
xor edx, edx
mov ecx, 2
call fcn.180020690
test al, al
je 0x18001905d
mov byte [rsi + 0x5ca2], 2
or dword [rsi + 0x4790], 0x40
xor ecx, ecx
mov dword [rsi + 0x47f0], 0x3f333333
call fcn.1800234f0
mov edx, ebp
lea rcx, [0x18005ab48]
call fcn.18003eb70
lea rcx, [0x18005ab28]
call fcn.18003eb70
lea rax, [0x18005ab64]
mov qword [rsp + 0x20], rax
lea rax, [0x18005ab5c]
mov qword [rsp + 0x28], rax
lea rax, [0x18005abb0]
mov qword [rsp + 0x30], rax
cmp r14d, 0x3000
jne 0x1800190ca
lea rcx, [0x18005ab70]
call fcn.18003eb70
jmp 0x180019101
movzx r8d, byte [rsi + 0x5ca2]
lea rdx, [0x18005abc0]
test ebp, ebp
mov eax, 0x10
mov rcx, rdi
cmove rcx, rax
mov rax, qword [0x1800660e8]
mov r8, qword [rsp + r8*8 + 0x20]
add rax, 0x38bc
add rcx, rax
call fcn.18003ecb0
call fcn.18001f4c0
call fcn.180029880
movzx eax, byte [rbx + 0x5ca0]
mov r14, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xc8]
test al, al
je 0x180019136
sub al, 1
mov byte [rbx + 0x5ca0], al
jne 0x180019136
mov dword [rbx + 0x473c], edi
mov rax, qword [0x1800660e8]
lea rcx, [0x18005a080]
mov byte [rbx + 0x3e45], 1
xor r8d, r8d
xor edx, edx
or dword [rax + 0x4790], 2
mov dword [rax + 0x47b0], 0x43c80000
mov dword [rax + 0x47b4], 0x43c80000
mov dword [rax + 0x4798], 4
call fcn.18001d240
cmp dword [rbx + 0x5be0], edi
jle 0x1800191bd
mov rsi, rdi
nop word [rax + rax]
mov rax, qword [rbx + 0x5be8]
cmp dword [rax + rsi + 4], 1
jne 0x1800191af
movsxd rdx, edi
mov rcx, rbx
shl rdx, 5
add rdx, rax
call qword [rax + rsi + 0x10]
inc edi
add rsi, 0x20
cmp edi, dword [rbx + 0x5be0]
jl 0x180019190
add rsp, 0xa0
pop rdi
pop rsi
pop rbx
ret