Function at 0x140002130
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp - 9], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x140009008]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov esi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002178
xor eax, eax
cmp edx, edx
cmove esi, eax
mov eax, esi
jmp 0x1400023c0
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400021b2
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400021b2
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], sil
mov eax, esi
jmp 0x1400023c0
cmp qword [rbx + 0x80], 0
jne 0x1400021c6
mov eax, 0xffffffff
jmp 0x1400023c0
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400021f3
mov rdx, qword [rbx + 0x90]
mov rcx, qword [rbx + 0x88]
mov qword [r8], rcx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp qword [rbx + 0x68], 0
jne 0x14000221a
movsx ecx, sil
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
jmp 0x1400023be
mov byte [rbp + 0xf], sil
lea rcx, [rbp + 0x17]
call fcn.140001890
nop
mov r8, qword [rbp + 0x2f]
mov r9, qword [rbp + 0x17]
lea rcx, [rbp + 0x17]
cmp r8, 0x10
cmovae rcx, r9
lea rdx, [rbp + 0x17]
cmovae rdx, r9
add rcx, qword [rbp + 0x27]
lea rax, [rbp - 1]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rdx
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x10]
lea r8, [rbp + 0xf]
lea rdx, [rbx + 0x74]
mov rcx, qword [rbx + 0x68]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
js 0x140002377
cmp eax, 1
jg 0x14000234d
lea rax, [rbp + 0x17]
mov r9, qword [rbp + 0x17]
mov r8, qword [rbp + 0x2f]
cmp r8, 0x10
cmovae rax, r9
mov rdi, qword [rbp - 1]
sub rdi, rax
je 0x1400022da
lea rcx, [rbp + 0x17]
cmp r8, 0x10
cmovae rcx, r9
mov r9, qword [rbx + 0x80]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r8, qword [rbp + 0x2f]
mov r9, qword [rbp + 0x17]
cmp rdi, rax
jne 0x14000237f
mov byte [rbx + 0x71], 1
lea rax, [rbp + 0xf]
cmp qword [rbp + 7], rax
jne 0x140002349
test rdi, rdi
jne 0x140002230
mov rcx, qword [rbp + 0x27]
cmp rcx, 0x20
jae 0x14000237f
mov rax, r8
sub rax, rcx
cmp rax, 8
jb 0x14000232e
lea rax, [rcx + 8]
mov qword [rbp + 0x27], rax
lea rax, [rbp + 0x17]
cmp r8, 0x10
cmovae rax, r9
xor edx, edx
mov qword [rcx + rax], rdx
mov byte [rcx + rax + 8], dl
jmp 0x140002228
mov byte [rsp + 0x20], 0
mov edx, 8
mov r9d, edx
lea rcx, [rbp + 0x17]
call fcn.140002ef0
jmp 0x140002228
mov ebx, esi
jmp 0x140002384
cmp eax, 3
jne 0x140002377
movsx ecx, byte [rbp + 0xf]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
mov r8, qword [rbp + 0x2f]
mov r9, qword [rbp + 0x17]
jmp 0x140002384
mov r8, qword [rbp + 0x2f]
mov r9, qword [rbp + 0x17]
mov ebx, 0xffffffff
cmp r8, 0x10
jb 0x1400023be
lea rdx, [r8 + 1]
mov rax, r9
cmp rdx, 0x1000
jb 0x1400023b6
add rdx, 0x27
mov r9, qword [r9 - 8]
sub rax, r9
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400023b6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r9
call fcn.140003214
mov eax, ebx
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400031f0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret