Function at 0x140047ff0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x208]
sub rsp, 0x2e0
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140104508]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov r15, rcx
xor r13d, r13d
mov qword [rsp + 0x20], r13
mov r12d, r13d
xor edx, edx
mov r8d, 0x178
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp + 0x180], rax
mov qword [rbp + 0x188], rax
mov qword [rbp + 0x190], rax
mov qword [rbp + 0x198], rax
mov qword [rbp + 0x1a0], rax
mov qword [rbp + 0x1a8], rax
mov qword [rbp + 0x1b0], rax
mov qword [rbp + 0x1b8], rax
mov qword [rbp + 0x1c0], rax
mov edi, r13d
mov esi, r13d
mov r8, qword [r15 + 0x388]
mov rcx, qword [r15 + 0x390]
sub rcx, r8
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 5
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x14004811b
lea rax, [r8 + 0x1c]
mov ecx, dword [rax - 4]
cmp edi, ecx
jl 0x14004810d
cmp esi, dword [rax]
jge 0x140048111
mov edi, ecx
mov esi, dword [rax]
add rax, 0x50
sub rdx, 1
jne 0x140048102
mov ebx, dword [r15 + 0x3a0]
test ebx, ebx
jne 0x14004812f
cmp dword [r15 + 0x3a4], r13d
je 0x140048194
mov r14d, dword [r15 + 0x3a4]
movd xmm1, edi
cvtdq2ps xmm1, xmm1
movd xmm0, esi
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
test ebx, ebx
jne 0x14004816e
movd xmm0, r14d
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
subss xmm0, dword [0x1400d49d4]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
cvttss2si edi, xmm0
mov esi, r14d
jmp 0x140048194
mov edi, ebx
mov esi, r14d
test r14d, r14d
je 0x140048194
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
subss xmm0, dword [0x1400d49d4]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
cvttss2si esi, xmm0
add edi, 0xf
and edi, 0xfffffff0
add esi, 0xf
and esi, 0xfffffff0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov edx, eax
lea rcx, [rbp]
call fcn.1400a1580
lea rcx, [rbp - 0x40]
call fcn.1400a2260
mov dword [rbp - 0x3c], edi
mov dword [rbp - 0x38], esi
mov dword [rbp - 0x34], edi
mov dword [rbp - 0x30], esi
mov qword [rbp - 0x2c], r13
mov dword [rbp - 0x24], 0x3e8
mov eax, dword [r15 + 0x3b8]
mov dword [rbp - 0x20], eax
mov qword [rbp - 0x1c], r13
mov qword [rbp - 0x14], r13
mov dword [rbp - 0xc], r13d
mov eax, dword [r15 + 0x3b0]
mov dword [rbp - 8], eax
mov dword [rbp - 4], 6
lea rcx, [rbp - 0x40]
call fcn.1400a9970
mov r14, rax
lea rcx, [rbp - 0x40]
call fcn.1400a2230
mov ebx, esi
imul ebx, edi
lea eax, [rbx + rbx*2]
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
call fcn.1400bf5ec
mov r10, rax
mov qword [rbp + 0x190], rax
mov dword [rbp + 0x180], edi
mov dword [rbp + 0x184], esi
mov dword [rbp + 0x188], edi
movsxd rcx, ebx
add rcx, rax
mov qword [rbp + 0x1a8], rcx
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov r9d, eax
mov dword [rbp + 0x198], eax
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov r8d, eax
mov dword [rbp + 0x19c], eax
mov dword [rbp + 0x1a0], r9d
lea eax, [rbx + rbx*4]
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd rcx, eax
add rcx, r10
mov qword [rbp + 0x1c0], rcx
mov dword [rbp + 0x1b0], r9d
mov dword [rbp + 0x1b4], r8d
mov dword [rbp + 0x1b8], r9d
lea rdi, [r15 + 8]
mov qword [rsp + 0x30], rdi
lea r8, [0x1400d49b8]
mov rdx, rdi
lea rcx, [rsp + 0x28]
call fcn.140006a90
nop
mov r8, qword [r15 + 0x10]
mov r13d, 0xffffffff
mov rdx, qword [rsp + 0x28]
cmp r8, rdx
je 0x140048341
add r8, 0xfffffffffffffff4
mov rax, qword [0x140104010]
cmp dword [r8], 0
jge 0x1400482f9
cmp r8, rax
jne 0x1400482ff
cmp dword [rdx - 0xc], 0
jge 0x140048310
mov r8, rdx
mov edx, dword [rdx - 8]
lea rcx, [r15 + 0x10]
call fcn.140001a10
jmp 0x14004833c
cmp r8, rax
je 0x140048334
mov eax, r13d
lock xadd dword [r8], eax
sub eax, 1
jg 0x14004832f
mov rcx, qword [r15 + 0x10]
sub rcx, 0xc
call fcn.1400bf5e4
mov rdx, qword [rsp + 0x28]
mov qword [r15 + 0x10], rdx
lock inc dword [rdx - 0xc]
mov rdx, qword [rsp + 0x28]
lea r8, [0x1400d0aec]
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
cmp qword [rsp + 0x20], 0
je 0x140048643
lea rcx, [rbp - 0x70]
call fcn.1400a2210
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x70]
mov rcx, r14
call fcn.1400a9fd0
test eax, eax
jle 0x140048643
lea rdx, [rsp + 0x68]
lea rcx, [rbp]
call fcn.1400a1aa0
lea rdx, [rsp + 0x38]
lea rcx, [rbp]
call fcn.1400a1e70
cmp eax, 1
jne 0x140048643
movsxd r8, dword [rsp + 0x40]
mov r9, qword [rsp + 0x20]
mov edx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
movsxd r8, dword [rsp + 0x50]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x70]
mov rcx, r14
call fcn.1400a9fd0
test eax, eax
js 0x140048643
lea rcx, [rbp]
test eax, eax
je 0x14004841c
lea rdx, [rsp + 0x68]
call fcn.1400a1aa0
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x70]
mov rcx, r14
call fcn.1400a9fd0
test eax, eax
jns 0x1400483f0
jmp 0x140048643
lea rdx, [rsp + 0x38]
call fcn.1400a12b0
test eax, eax
je 0x140048476
js 0x140048643
movsxd r8, dword [rsp + 0x40]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
movsxd r8, dword [rsp + 0x50]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea rdx, [rsp + 0x38]
lea rcx, [rbp]
call fcn.1400a12b0
test eax, eax
jne 0x14004842a
mov r8d, dword [r15 + 0x3c8]
mov rcx, qword [r15 + 0x390]
sub rcx, qword [r15 + 0x388]
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 5
mov rax, rdx
shr rax, 0x3f
add rdx, rax
xor edi, edi
cmp r8d, edx
cmovne edi, r8d
lea r8, [rbp + 0x180]
mov edx, edi
mov rcx, r15
call fcn.1400478f0
mov esi, eax
lea rdx, [rbp + 0x180]
mov rcx, r14
call fcn.1400aa1f0
test eax, eax
jne 0x14004863e
nop dword [rax]
xor ebx, ebx
test esi, esi
sete bl
lea r8, [rsp + 0x68]
mov edx, ebx
mov rcx, r14
call fcn.1400aa080
test eax, eax
je 0x14004856d
nop word [rax + rax]
lea rdx, [rsp + 0x68]
lea rcx, [rbp]
call fcn.1400a1aa0
lea rdx, [rsp + 0x38]
lea rcx, [rbp]
call fcn.1400a1e70
test eax, eax
js 0x14004863e
je 0x14004855a
movsxd r8, dword [rsp + 0x40]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
movsxd r8, dword [rsp + 0x50]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea r8, [rsp + 0x68]
mov edx, ebx
mov rcx, r14
call fcn.1400aa080
test eax, eax
jne 0x140048500
test esi, esi
je 0x1400485e4
inc r12d
lea r8d, [rdi + 1]
mov rcx, qword [r15 + 0x390]
sub rcx, qword [r15 + 0x388]
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 5
mov rax, rdx
shr rax, 0x3f
add rdx, rax
xor edi, edi
cmp r8d, edx
cmovne edi, r8d
cmp edi, dword [r15 + 0x3c8]
je 0x1400485e4
cmp r12d, edx
jge 0x1400485e4
lea r8, [rbp + 0x180]
mov edx, edi
mov rcx, r15
call fcn.1400478f0
mov esi, eax
lea rdx, [rbp + 0x180]
mov rcx, r14
call fcn.1400aa1f0
test eax, eax
je 0x1400484e0
jmp 0x14004863e
lea rdx, [rsp + 0x38]
lea rcx, [rbp]
call fcn.1400a12b0
test eax, eax
je 0x14004863e
js 0x14004863e
movsxd r8, dword [rsp + 0x40]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
movsxd r8, dword [rsp + 0x50]
mov r9, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea rdx, [rsp + 0x38]
lea rcx, [rbp]
call fcn.1400a12b0
test eax, eax
jne 0x1400485f6
mov rdi, qword [rsp + 0x30]
lea rcx, [rbp]
call fcn.1400a1250
lea rcx, [rbp - 0x70]
call fcn.1400a2190
mov rcx, r14
call fcn.1400aa050
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x14004866d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp + 0x190]
test rcx, rcx
je 0x14004867e
call fcn.1400bf5e4
lea r8, [0x1400d4998]
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.140006a90
nop
mov rbx, qword [rsp + 0x60]
cmp dword [rbx - 0xc], 0
jl 0x1400486a9
mov qword [rsp + 0x58], rbx
lock inc dword [rbx - 0xc]
jmp 0x1400486cd
mov rax, qword [0x140104018]
mov qword [rsp + 0x58], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x58]
call fcn.140001a10
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140051e60
nop
mov rcx, qword [rsp + 0x60]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140104010]
je 0x140048707
mov eax, r13d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140048707
mov rcx, qword [rsp + 0x60]
add rcx, 0xfffffffffffffff4
call fcn.1400bf5e4
nop
mov rax, qword [rsp + 0x28]
add rax, 0xfffffffffffffff4
cmp rax, qword [0x140104010]
je 0x140048732
lock xadd dword [rax], r13d
sub r13d, 1
jg 0x140048732
mov rcx, qword [rsp + 0x28]
add rcx, 0xfffffffffffffff4
call fcn.1400bf5e4
mov eax, 1
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.1400bf680
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret