Function at 0x18002e730
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0x88
mov rax, qword [0x180067dc0]
xor rax, rsp
mov qword [rbp - 9], rax
movzx edi, byte [rbp + 0x6f]
mov rsi, rcx
movsxd r15, dword [rbp + 0x77]
movzx ebx, r9w
movzx r14d, r8w
cmp dil, 0x18
ja 0x18002e9c4
lea r8, [0x180050ad8]
lea rcx, [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov r9, qword [rbp - 0x49]
test r9, r9
je 0x18002e9c4
cmp byte [rbp + 0x7f], 0
mov ecx, r14d
mov dword [rbp - 0x3d], ecx
mov r14d, ebx
mov qword [rsp + 0x80], r12
mov dword [rbp - 0x41], 0x28
je 0x18002e7b6
mov eax, r14d
neg eax
mov dword [rbp - 0x39], eax
jmp 0x18002e7ba
mov dword [rbp - 0x39], r14d
xor ebx, ebx
mov word [rbp - 0x33], di
mov eax, edi
mov dword [rbp - 0x31], ebx
imul eax, ecx
mov r12d, 1
mov word [rbp - 0x35], r12w
mov edx, ebx
mov qword [rbp - 0x29], rbx
mov dword [rbp - 0x21], ebx
add eax, 0x1f
shr eax, 3
and eax, 0x1ffffffc
imul eax, r14d
mov dword [rbp - 0x2d], eax
cmp dil, 0x18
jae 0x18002e7fe
mov ecx, edi
mov edx, r12d
shl edx, cl
mov dword [rbp - 0x21], edx
mov ecx, 0x4d42
mov dword [rbp - 0x1d], ebx
mov word [rbp - 0x19], cx
add eax, 0x28
lea ecx, [rdx*4]
mov dword [rbp - 0x13], ebx
add eax, ecx
mov r8, r12
mov dword [rbp - 0x17], eax
mov edx, 0xe
lea eax, [rcx + 0x36]
lea rcx, [rbp - 0x19]
mov dword [rbp - 0xf], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rbp - 0x49]
lea rcx, [rbp - 0x41]
mov r8, r12
mov edx, 0x28
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edx, dword [rbp - 0x21]
mov byte [rbp - 0x4e], bl
cmp edx, 0x100
ja 0x18002e922
movss xmm1, dword [0x180051d18]
lea ecx, [rdx - 1]
movaps xmmword [rsp + 0x70], xmm6
xorps xmm0, xmm0
cvtsi2ss xmm0, rcx
divss xmm1, xmm0
cvttss2si eax, xmm1
movzx ecx, al
movd xmm6, ecx
cvtdq2ps xmm6, xmm6
test edx, edx
je 0x18002e8c8
nop word [rax + rax]
mov r9, qword [rbp - 0x49]
lea rcx, [rbp - 0x51]
mov eax, ebx
xorps xmm0, xmm0
mov r8, r12
mov edx, 4
cvtsi2ss xmm0, rax
mulss xmm0, xmm6
cvttss2si eax, xmm0
mov byte [rbp - 0x4f], al
mov byte [rbp - 0x50], al
mov byte [rbp - 0x51], al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
inc ebx
cmp ebx, dword [rbp - 0x21]
jb 0x18002e890
movaps xmm6, xmmword [rsp + 0x70]
mov r8d, dword [rbp - 0x2d]
xor edx, edx
mov eax, r8d
div r14d
mov edi, eax
cmp r15d, eax
jne 0x18002e95b
mov r9, qword [rbp - 0x49]
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
movzx eax, r12b
mov r12, qword [rsp + 0x80]
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.18004a020
add rsp, 0x88
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
test edx, edx
je 0x18002e8cd
nop word [rax + rax]
mov r9, qword [rbp - 0x49]
lea rcx, [rbp - 0x51]
mov r8, r12
mov word [rbp - 0x50], 0
mov edx, 4
mov byte [rbp - 0x51], bl
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
inc ebx
cmp ebx, dword [rbp - 0x21]
jb 0x18002e930
jmp 0x18002e8cd
jge 0x18002e9b3
sub edi, r15d
mov byte [rbp - 0x4d], 0
test r14d, r14d
je 0x18002e8f0
nop dword [rax]
mov r9, qword [rbp - 0x49]
mov r8, r15
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add rsi, r15
test edi, edi
jle 0x18002e9a9
mov ebx, edi
nop dword [rax]
mov r9, qword [rbp - 0x49]
lea rcx, [rbp - 0x4d]
mov r8, r12
mov rdx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, r12
jne 0x18002e990
sub r14, r12
jne 0x18002e970
jmp 0x18002e8f0
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
jmp 0x18002e8fe
xor al, al
jmp 0x18002e906