Function at 0x140040640
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x508]
sub rsp, 0x608
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov rax, qword [0x140184aa8]
xor rax, rsp
mov qword [rbp + 0x4f0], rax
xor r15d, r15d
mov dword [rsp + 0x40], r15d
mov eax, dword [0x1401923e8]
mov rbx, qword gs:[0x58]
mov r14d, 0x10
mov rbx, qword [rbx + rax*8]
cmp qword [rbx + r14], 0xffffffffffffffff
je 0x140040a49
xor ecx, ecx
call fcn.1400e2418
mov qword [rbp - 0x80], rax
lea rcx, [rbp - 0x80]
call fcn.1400e2330
lea rdx, str._04d__02d__02d__02d:_02d:_02d
test rax, rax
je 0x14004070c
mov r9d, dword [rax + 0x10]
inc r9d
mov r8d, dword [rax + 0x14]
add r8d, 0x76c
mov ecx, dword [rax]
mov dword [rsp + 0x38], ecx
mov ecx, dword [rax + 4]
mov dword [rsp + 0x30], ecx
mov ecx, dword [rax + 8]
mov dword [rsp + 0x28], ecx
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x20], eax
lea rcx, [rbp + 0x90]
call fcn.14003fef0
jmp 0x140040732
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
lea rcx, [rbp + 0x90]
call fcn.14003fef0
xor edx, edx
mov r8d, 0xf8
lea rcx, [rbp - 0x70]
call fcn.1400d5b20
lea rcx, [0x140000000]
lea rax, [rcx + 0x145288]
mov qword [rbp - 0x70], rax
lea rax, [rcx + 0x145100]
mov qword [rbp - 0x60], rax
mov dword [rsp + 0x40], 1
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x28], rax
mov dword [rbp + 0x24], 0x80
mov qword [rbp - 0x68], r15
xor r8d, r8d
lea rdx, [rbp - 0x58]
lea rcx, [rbp + 0x28]
call fcn.14001cb10
nop
lea rax, [rbp - 0x60]
mov qword [rsp + 0x48], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x64], edx
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x70], rax
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rbp + rcx - 0x74], edx
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx - 0x70], rax
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx - 0x74], edx
lea rax, [rbp - 0x58]
mov qword [rsp + 0x48], rax
lea rcx, [rbp - 0x58]
call fcn.14001c890
nop
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp - 0x58], rax
mov qword [rbp + 0x10], r15
mov dword [rbp + 0x18], r15d
cmp qword [rbx + r14], 0
jne 0x140040902
mov rdi, r15
nop dword [rax + rax]
mov r8, rdi
mov rdx, qword [str.MW_DEBUG_LOG__04d.txt]
lea rcx, [rbp + 0xb0]
call fcn.14003ff50
inc rdi
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileA]
mov rsi, rax
mov rcx, qword [rbx + r14]
test rcx, rcx
je 0x140040897
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx + r14], rsi
cmp rdi, 0x64
je 0x1400408e7
cmp rsi, 0
je 0x140040840
cmp rsi, 0xffffffffffffffff
je 0x140040840
lea rdx, [0x140116e90]
lea rcx, [rbp - 0x60]
call fcn.14000d110
mov rcx, rax
lea rdx, [rbp + 0x90]
call fcn.14000d110
mov rcx, rax
mov dl, 9
call fcn.14003ec20
mov rcx, rax
lea rdx, str._Log_start__r_n
call fcn.14000d110
jmp 0x140040902
mov rcx, rsi
test rsi, rsi
je 0x1400408f5
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx + r14], 0xffffffffffffffff
jmp 0x140040a2a
lea rdi, [rbp + 0x548]
call fcn.140008700
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
mov r9, qword [rbp + 0x540]
mov r8d, 0x400
lea rdx, [rbp + 0xf0]
mov rcx, qword [rax]
call fcn.1400e062c
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x60]
call fcn.14000d110
mov rcx, rax
mov dl, 9
call fcn.14003ec20
mov rcx, rax
lea rdx, [rbp + 0xf0]
call fcn.14000d110
mov rcx, rax
lea rdx, [0x140116e90]
call fcn.14000d110
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x70]
call fcn.14001b5c0
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x78]
mov r8d, dword [rsp + 0x68]
mov rcx, qword [rbx + r14]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x1400409bf
mov rcx, qword [rbx + r14]
test rcx, rcx
je 0x1400409b7
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx + r14], 0xffffffffffffffff
mov rax, qword [rsp + 0x70]
cmp rax, 0x10
jb 0x140040a17
inc rax
mov rcx, qword [rsp + 0x58]
cmp rax, 0x1000
jb 0x140040a12
test cl, 0x1f
je 0x1400409e5
call fcn.1400dddbc
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1400409f4
call fcn.1400dddbc
int3
sub rcx, rax
cmp rcx, 8
jae 0x140040a03
call fcn.1400dddbc
int3
cmp rcx, 0x27
jbe 0x140040a0f
call fcn.1400dddbc
int3
mov rcx, rax
call fcn.1400b48f8
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], 0xf
mov byte [rsp + 0x58], 0
lea rcx, [rbp + 0x28]
call fcn.14001b5f0
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x28], rax
lea rcx, [rbp + 0x28]
call fcn.140099364
nop
mov rcx, qword [rbp + 0x4f0]
xor rcx, rsp
call fcn.1400b48a0
add rsp, 0x608
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret