Function at 0x140004270
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0xb0
mov rax, qword [0x14000e030]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x48], edx
mov qword [rsp + 0x58], rcx
mov rsi, qword [rsp + 0x58]
mov edi, dword [rsp + 0x48]
call fcn.140002360
mov ecx, eax
mov edx, edi
call fcn.140002370
test al, 1
jne 0x1400042b2
jmp 0x1400042c4
mov ecx, dword [rsp + 0x48]
call fcn.140005cf0
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
cmp rax, 0
je 0x140004310
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov rdi, rax
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const___ptr64]
cmp rdi, rax
jae 0x140004310
mov ecx, dword [rsp + 0x48]
call fcn.140005d30
mov bl, al
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], bl
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
cmp qword [rsi + 0x80], 0
jne 0x140004328
call fcn.140002360
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
mov rcx, rsi
call fcn.140003e60
cmp qword [rsi + 0x68], 0
jne 0x14000436b
mov rsi, qword [rsi + 0x80]
mov ecx, dword [rsp + 0x48]
call fcn.140005d30
mov cl, al
mov rdx, rsi
call fcn.140005df0
test al, 1
jne 0x140004357
jmp 0x14000435d
mov eax, dword [rsp + 0x48]
jmp 0x140004362
call fcn.140002360
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
mov qword [rsp + 0x60], 0x20
mov ecx, dword [rsp + 0x48]
call fcn.140005d30
mov byte [rsp + 0x7f], al
mov rcx, qword [rsi + 0x68]
lea rax, [rsp + 0xa0]
lea r9, [rsp + 0x80]
mov rdx, rsi
add rdx, 0x74
lea r8, [rsp + 0x68]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov rax, 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]
lea r8, [rsp + 0x7f]
call rax
mov ecx, eax
sub ecx, 2
jb 0x1400043e3
jmp 0x1400043d9
sub eax, 3
je 0x14000445a
jmp 0x140004481
mov rax, qword [rsp + 0x68]
lea rcx, [rsp + 0x80]
sub rax, rcx
mov qword [rsp + 0x50], rax
xor eax, eax
cmp rax, qword [rsp + 0x50]
jae 0x140004435
mov rdi, qword [rsp + 0x50]
mov r9, qword [rsi + 0x80]
mov r8, qword [rsp + 0x50]
lea rcx, [rsp + 0x80]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
je 0x140004435
call fcn.140002360
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
mov byte [rsi + 0x71], 1
lea rax, [rsp + 0x7f]
cmp qword [rsp + 0x70], rax
je 0x14000444f
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
call fcn.140002360
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
mov rdx, qword [rsi + 0x80]
mov cl, byte [rsp + 0x7f]
call fcn.140005df0
test al, 1
jne 0x140004470
jmp 0x140004476
mov eax, dword [rsp + 0x48]
jmp 0x14000447b
call fcn.140002360
mov dword [rsp + 0x4c], eax
jmp 0x14000448a
call fcn.140002360
mov dword [rsp + 0x4c], eax
mov esi, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1400078d0
mov eax, esi
add rsp, 0xb0
pop rbx
pop rdi
pop rsi
ret