Function at 0x14004cbc0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xc8]
sub rsp, 0x1c8
movzx ebx, r9b
mov r14, r8
mov r15, rdx
mov rsi, rcx
xor edi, edi
mov dword [rbp + 0x118], edi
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.14004a6b0
nop
lea rax, [rsp + 0x30]
test bl, bl
jne 0x14004cc6a
mov qword [rsp + 0x70], rax
mov rdx, r14
lea rcx, [rsp + 0x30]
call fcn.140048190
mov rbx, rax
mov rdx, r15
lea rcx, [rbp - 0x70]
call fcn.14004a810
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14004c3b0
nop
movzx edx, byte [rax]
movzx ecx, byte [rbx]
mov byte [rax], cl
mov byte [rbx], dl
lea rcx, [rbx + 8]
mov rdx, qword [rax + 8]
mov r8, qword [rcx]
mov qword [rax + 8], r8
mov qword [rcx], rdx
movzx edx, byte [rbx]
call fcn.14004e8a0
nop
jmp 0x14004cdad
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x30], 0
xor eax, eax
mov qword [rsp + 0x38], rax
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.14004e8a0
mov byte [rsp + 0x30], 3
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.1400bde50
mov rbx, rax
lea rax, [rbp + 0x118]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rbx
mov rdx, r14
mov rcx, rbx
call fcn.14004a810
nop
mov qword [rsp + 0x38], rbx
mov rdx, r15
lea rcx, [rbp - 0x70]
call fcn.14004a810
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14004c3b0
nop
movzx edx, byte [rax]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov byte [rsp + 0x30], dl
mov rcx, qword [rax + 8]
mov rdx, qword [rsp + 0x38]
mov qword [rax + 8], rdx
mov qword [rsp + 0x38], rcx
movzx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.14004e8a0
nop
lea rax, [rsp + 0x30]
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x30], 0
xor eax, eax
mov qword [rsp + 0x38], rax
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.14004e8a0
mov byte [rsp + 0x30], 3
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.1400bde50
mov rbx, rax
lea rax, [rbp + 0x118]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rbx
mov rdx, qword [rbp + 0x128]
mov rcx, rbx
call fcn.14004a810
nop
mov qword [rsp + 0x38], rbx
mov rdx, qword [rbp + 0x120]
lea rcx, [rbp - 0x70]
call fcn.14004a810
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14004c3b0
nop
movzx edx, byte [rax]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov byte [rsp + 0x30], dl
mov rcx, qword [rax + 8]
mov rdx, qword [rsp + 0x38]
mov qword [rax + 8], rdx
mov qword [rsp + 0x38], rcx
movzx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.14004e8a0
nop
mov rbx, rsi
cmp qword [rsi + 0x18], 0x10
jb 0x14004cdba
mov rbx, qword [rsi]
lea rax, [0x1400c8e10]
mov qword [rbp - 0x50], rax
lea rcx, [rbp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rbp + 0x118], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x50], rax
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x54], edx
lea rax, [rbp - 0x48]
mov qword [rsp + 0x60], rax
lea rcx, [rbp - 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x48], rax
mov byte [rbp + 0x34], 0
mov byte [rbp + 0x29], 0
lea rcx, [rbp - 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x38], rdi
mov rax, qword [0x140192740]
mov qword [rbp + 0x2c], rax
mov qword [rbp + 0x20], rdi
mov r9d, 0x40
lea r8d, [r9 - 0x3e]
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.1400509d0
test rax, rax
jne 0x14004ce91
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x50], rax
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x54], edx
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x50]
call fcn.14004c0d0
cmp qword [rbp + 0x38], 0
je 0x14004cfe0
mov rax, qword [rbp - 0x30]
lea rcx, [rbp + 0x28]
cmp qword [rax], rcx
jne 0x14004cef7
mov rdx, qword [rbp + 0x48]
mov rcx, qword [rbp + 0x40]
mov qword [rax], rcx
mov rax, qword [rbp - 0x10]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 8]
mov dword [rax], edx
cmp qword [rbp + 0x20], 0
je 0x14004cf55
cmp byte [rbp + 0x29], 0
je 0x14004cf55
mov rax, qword [rbp - 0x48]
mov edx, 0xffffffff
lea rcx, [rbp - 0x48]
call qword [rax + Ordinal_26]
cmp eax, 0xffffffff
jne 0x14004cf1d
xor al, al
jmp 0x14004cf57
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x30]
lea rdx, [rbp + 0x2c]
mov rcx, qword [rbp + 0x20]
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 0x14004cfa1
sub eax, 1
je 0x14004cfa5
cmp eax, 2
je 0x14004cf51
xor al, al
jmp 0x14004cf57
mov byte [rbp + 0x29], 0
mov al, 1
lea rbx, [rbp - 0x48]
test al, al
cmove rbx, rdi
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
cmovne rbx, rdi
mov byte [rbp + 0x34], 0
mov byte [rbp + 0x29], 0
lea rcx, [rbp - 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x38], rdi
mov rax, qword [0x140192740]
mov qword [rbp + 0x2c], rax
mov qword [rbp + 0x20], rdi
test rbx, rbx
jne 0x14004d021
jmp 0x14004d005
mov byte [rbp + 0x29], 0
lea rax, [rsp + 0x30]
mov rbx, qword [rsp + 0x70]
sub rbx, rax
je 0x14004cfd4
mov r9, qword [rbp + 0x38]
mov r8, rbx
mov edx, 1
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x14004cfd4
xor al, al
jmp 0x14004cf57
cmp byte [rbp + 0x29], 0
sete al
jmp 0x14004cf57
mov byte [rbp + 0x34], 0
mov byte [rbp + 0x29], 0
lea rcx, [rbp - 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x38], rdi
mov rax, qword [0x140192740]
mov qword [rbp + 0x2c], rax
mov qword [rbp + 0x20], rdi
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.140048300
nop
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae rcx, qword [rsp + 0x70]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rbp - 0x70]
call fcn.1400bda98
mov edx, eax
test eax, eax
jne 0x14004d093
mov eax, dword [rbp - 0x60]
bt eax, 0xa
jae 0x14004d085
mov ecx, dword [rbp - 0x5c]
cmp ecx, 0xa000000c
jne 0x14004d076
lea edi, [rdx + 4]
jmp 0x14004d0b4
cmp ecx, 0xa0000003
jne 0x14004d085
mov edi, 0xa
jmp 0x14004d0b4
movzx edi, al
and edi, 0x10
or edi, 0x20
shr edi, 4
jmp 0x14004d0b4
mov dword [rsp + 0x64], 0xffff
sub eax, 2
je 0x14004d0af
sub eax, 1
je 0x14004d0af
sub eax, 0x32
je 0x14004d0af
cmp eax, 0x46
jne 0x14004d0b4
mov edi, 1
mov dword [rsp + 0x30], edx
lea rax, [0x1401912c0]
mov qword [rsp + 0x38], rax
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm0
test edi, edi
je 0x14004d186
cmp edi, 1
sete bl
lea rcx, [rsp + 0x70]
call fcn.14004dfe0
nop
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x50], rax
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x54], edx
lea rcx, [rbp - 0x48]
call fcn.14004b430
lea rcx, [rbp - 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x58]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
test bl, bl
je 0x14004d191
movzx edx, byte [rsp + 0x50]
lea rcx, [rsp + 0x58]
call fcn.14004e8a0
nop
mov rcx, rsi
call fcn.14004b4c0
nop
mov rcx, r15
call fcn.14004b4c0
nop
mov rcx, r14
call fcn.14004b4c0
nop
mov rcx, qword [rbp + 0x120]
call fcn.14004b4c0
nop
mov rcx, qword [rbp + 0x128]
call fcn.14004b4c0
xor al, al
add rsp, 0x1c8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov bl, 1
test edx, edx
jne 0x14004d1e7
jmp 0x14004d0dd
movzx edx, byte [rsp + 0x50]
lea rcx, [rsp + 0x58]
call fcn.14004e8a0
nop
mov rcx, rsi
call fcn.14004b4c0
nop
mov rcx, r15
call fcn.14004b4c0
nop
mov rcx, r14
call fcn.14004b4c0
nop
mov rcx, qword [rbp + 0x120]
call fcn.14004b4c0
nop
mov rcx, qword [rbp + 0x128]
call fcn.14004b4c0
mov al, 1
add rsp, 0x1c8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x30]
lea rcx, str.exists
call fcn.14004dc80
int3