Function at 0x14004b800
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140119a90]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, rcx
cmp qword [rcx + 0x68], 0
je 0x14004ba68
cmp byte [rcx + 0x71], 0
je 0x14004ba68
mov rax, qword [rcx]
or edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
jne 0x14004b85e
xor al, al
jmp 0x14004ba6a
xor r14d, r14d
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], r14
mov r15d, 0xf
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x20], r14
mov byte [rbp - 0x30], r14b
xor ecx, ecx
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x20], 8
lea rax, [rbp - 0x30]
cmp r15, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
mov rdx, qword [rbp - 0x18]
mov r9, qword [rbp - 0x30]
lea rcx, [rbp - 0x30]
cmp rdx, 0x10
cmovae rcx, r9
lea r8, [rbp - 0x30]
cmovae r8, r9
mov r9, qword [rbp - 0x20]
add r9, rcx
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x74]
mov rcx, qword [rdi + 0x68]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14004b8e1
sub eax, 1
jne 0x14004b9d6
jmp 0x14004b8e5
mov byte [rdi + 0x71], 0
lea rax, [rbp - 0x30]
mov r9, qword [rbp - 0x30]
mov rdx, qword [rbp - 0x18]
cmp rdx, 0x10
cmovae rax, r9
mov rbx, qword [rbp - 0x40]
sub rbx, rax
je 0x14004b934
lea rcx, [rbp - 0x30]
cmp rdx, 0x10
cmovae rcx, r9
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
jne 0x14004b9db
mov rdx, qword [rbp - 0x18]
mov r9, qword [rbp - 0x30]
cmp byte [rdi + 0x71], 0
je 0x14004b9fb
test rbx, rbx
jne 0x14004b8a0
or rax, 0xffffffffffffffff
mov r8, qword [rbp - 0x20]
sub rax, r8
cmp rax, 8
jbe 0x14004b9ed
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x14004b9df
cmp rdx, rbx
jae 0x14004b981
mov rdx, rbx
lea rcx, [rbp - 0x30]
call fcn.140007910
mov rdx, qword [rbp - 0x18]
mov r9, qword [rbp - 0x30]
jmp 0x14004b99d
test rbx, rbx
jne 0x14004b9a6
mov qword [rbp - 0x20], r14
lea rax, [rbp - 0x30]
cmp rdx, 0x10
cmovae rax, r9
mov byte [rax], bl
jmp 0x14004b898
test rbx, rbx
je 0x14004b8a0
lea rcx, [rbp - 0x30]
cmp rdx, 0x10
cmovae rcx, r9
mov rax, qword [rbp - 0x20]
xor edx, edx
mov qword [rcx + rax], rdx
mov qword [rbp - 0x20], rbx
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 0x10
cmovae rax, qword [rbp - 0x30]
mov byte [rax + rbx], dl
jmp 0x14004b898
cmp eax, 2
je 0x14004b9fb
xor bl, bl
jmp 0x14004b9fd
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov bl, 1
mov rax, qword [rbp - 0x18]
cmp rax, 0x10
jb 0x14004ba57
inc rax
mov rcx, qword [rbp - 0x30]
cmp rax, 0x1000
jb 0x14004ba52
test cl, 0x1f
je 0x14004ba22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x14004ba32
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x14004ba42
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x14004ba4f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rax
call fcn.1400608a4
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x20], r14
mov byte [rbp - 0x30], 0
movzx eax, bl
jmp 0x14004ba6a
mov al, 1
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140060f20
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret