Function at 0x180087550
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x100]
sub rsp, 0x200
mov rdi, rcx
xor esi, esi
mov dword [rbp + 0x138], esi
lea rcx, [rsp + 0x30]
call fcn.180085ba0
nop
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.18001cb30
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.18001e200
cmp byte [rax], sil
jne 0x180087615
movzx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.18001c4a0
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x1800875ef
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1800875ea
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x180087b47
mov rcx, r8
call fcn.1800ffa38
mov byte [rdi], 0
mov qword [rdi + 0x18], 0xf
mov qword [rdi + 0x10], rsi
mov rbx, qword [rsp + 0x248]
add rsp, 0x200
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
cmp byte [rsp + 0x30], 1
jne 0x180087b4e
mov r8, rdi
lea rdx, [rbp + 0x70]
mov rcx, qword [rsp + 0x38]
call fcn.18008aed0
mov r8, qword [rax + 8]
mov rdx, qword [rax]
mov rcx, qword [rsp + 0x38]
call fcn.18008ad30
call fcn.1800feadc
lea rcx, str.._globals.json
mov qword [rbp + 0x70], rcx
mov qword [rbp + 0x78], 0xe
lea r8, [rbp + 0x70]
mov edx, eax
lea rcx, [rbp + 0xa0]
call fcn.180043e80
nop
lea rdx, [rbp + 0xa0]
lea rcx, [rsp + 0x40]
call fcn.1800651b0
nop
mov rdx, rax
lea rcx, [rbp + 0x80]
call fcn.180024bb0
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x1800876d4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800876cf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800876cf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800ffa38
movdqa xmm0, xmmword [0x1801817f0]
movdqu xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x40], si
mov rdx, qword [rbp + 0xb8]
cmp rdx, 7
jbe 0x180087730
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xa0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18008772b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18008772b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800ffa38
movdqa xmm0, xmmword [0x1801817f0]
movdqu xmmword [rbp + 0xb0], xmm0
mov word [rbp + 0xa0], si
lea rbx, [rbp + 0x80]
cmp qword [rbp + 0x98], 7
cmova rbx, qword [rbp + 0x80]
lea rax, [0x18013e620]
mov qword [rsp + 0x60], rax
lea rcx, [rbp + 8]
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 + 0x138], 7
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x60]
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 [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea r15, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x68], r15
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rsi
mov rax, qword [0x1801d3d00]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rsi
mov r8d, 0x12
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.180030d60
test rax, rax
jne 0x180087832
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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 [rsp + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.180054b40
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0xf
jbe 0x180087871
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.18002f850
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1800878bf
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800878ba
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800878ba
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800ffa38
cmp qword [rbp - 0x18], 0
je 0x180087a07
mov rax, qword [rbp - 0x80]
lea rcx, [rbp - 0x28]
cmp qword [rax], rcx
jne 0x1800878f1
mov rdx, qword [rbp - 8]
mov rcx, qword [rbp - 0x10]
mov qword [rax], rcx
mov rax, qword [rbp - 0x60]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x48]
mov dword [rax], edx
cmp qword [rbp - 0x30], 0
je 0x18008796e
cmp byte [rbp - 0x27], 0
je 0x18008796e
mov rax, qword [rsp + 0x68]
mov r8, qword [rax + 0x18]
lea rax, [fcn.180032030]
mov edx, 0xffffffff
lea rcx, [rsp + 0x68]
cmp r8, rax
jne 0x180087924
call fcn.180032030
jmp 0x180087927
call r8
cmp eax, 0xffffffff
jne 0x180087930
xor bl, bl
jmp 0x180087970
lea rax, [rbp + 0x138]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xf8]
lea r8, [rbp + 0xd8]
lea rdx, [rbp - 0x24]
mov rcx, qword [rbp - 0x30]
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 0x1800879bf
sub eax, 1
je 0x1800879c3
cmp eax, 2
je 0x18008796a
xor bl, bl
jmp 0x180087970
mov byte [rbp - 0x27], 0
mov bl, 1
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, [rsp + 0x68]
test bl, bl
cmove rcx, rsi
mov rbx, rsi
test eax, eax
cmove rbx, rcx
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rsi
mov rax, qword [0x1801d3d00]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rsi
test rbx, rbx
jne 0x180087a4c
jmp 0x180087a2d
mov byte [rbp - 0x27], 0
lea rax, [rbp + 0xd8]
mov rbx, qword [rbp + 0x138]
sub rbx, rax
je 0x1800879fb
mov r9, qword [rbp - 0x18]
mov r8, rbx
mov edx, 1
lea rcx, [rbp + 0xd8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x1800879fb
xor bl, bl
jmp 0x180087970
cmp byte [rbp - 0x27], 0
sete bl
jmp 0x180087970
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rsi
mov rax, qword [0x1801d3d00]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rsi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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 [rsp + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
mov qword [rsp + 0x68], r15
cmp qword [rbp - 0x18], 0
je 0x180087aa0
mov rax, qword [rbp - 0x80]
lea rcx, [rbp - 0x28]
cmp qword [rax], rcx
jne 0x180087aa0
mov rdx, qword [rbp - 8]
mov rcx, qword [rbp - 0x10]
mov qword [rax], rcx
mov rax, qword [rbp - 0x60]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x48]
mov dword [rax], edx
cmp byte [rbp - 0x1c], 0
je 0x180087ab0
lea rcx, [rsp + 0x68]
call fcn.1800322d0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x70]
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 + 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 7
jbe 0x180087b1b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180087b16
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180087b16
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800ffa38
movdqa xmm0, xmmword [0x1801817f0]
movdqu xmmword [rbp + 0x90], xmm0
mov word [rbp + 0x80], si
movzx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.18001c4a0
nop
jmp 0x1800875b5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
lea rcx, [rsp + 0x30]
call fcn.18001bd30
mov qword [rbp + 0x138], rax
lea r8, [rbp + 0x138]
lea rdx, str.cannot_use_erase___with
lea rcx, [rsp + 0x40]
call fcn.180023110
nop
mov r8, rax
mov edx, 0x133
lea rcx, [rbp + 0xa0]
call fcn.18001a8f0
lea rdx, [0x1801a7f28]
lea rcx, [rbp + 0xa0]
call sub.VCRUNTIME140.dll__CxxThrowException
int3