Function at 0x18001d580
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0xe8
mov rax, qword [0x1800a9880]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov dword [rsp + 0xa0], edx
mov qword [rsp + 0x98], rcx
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x84], eax
call fcn.180016390
mov edx, dword [rsp + 0x84]
mov ecx, eax
call fcn.1800163a0
test al, 1
jne 0x18001d5e3
jmp 0x18001d5fb
mov ecx, dword [rsp + 0xa0]
call fcn.1800163c0
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov rcx, qword [rsp + 0x78]
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 0x18001d670
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x70], rax
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const___ptr64]
mov rcx, rax
mov rax, qword [rsp + 0x70]
cmp rax, rcx
jae 0x18001d670
mov ecx, dword [rsp + 0xa0]
call fcn.180016410
mov rcx, qword [rsp + 0x78]
mov byte [rsp + 0x6f], al
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov cl, byte [rsp + 0x6f]
mov byte [rax], cl
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov rax, qword [rsp + 0x78]
cmp qword [rax + 0x80], 0
jne 0x18001d694
call fcn.180016390
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov rcx, qword [rsp + 0x78]
call fcn.18001d3b0
mov rax, qword [rsp + 0x78]
cmp qword [rax + 0x68], 0
jne 0x18001d70d
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x80]
mov qword [rsp + 0x60], rax
mov ecx, dword [rsp + 0xa0]
call fcn.180016410
mov rdx, qword [rsp + 0x60]
mov cl, al
call fcn.18001e9b0
test al, 1
jne 0x18001d6e4
jmp 0x18001d6f4
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x5c], eax
jmp 0x18001d6fd
call fcn.180016390
mov dword [rsp + 0x5c], eax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov qword [rsp + 0x90], reloc.WLDAP32.dll_Ordinal_32
mov ecx, dword [rsp + 0xa0]
call fcn.180016410
mov rdx, qword [rsp + 0x78]
mov byte [rsp + 0xbf], al
mov rcx, qword [rdx + 0x68]
lea r8, [rsp + 0xe0]
lea r9, [rsp + 0xc0]
add rdx, 0x74
mov rax, rsp
lea r10, [rsp + 0xa8]
mov qword [rax + 0x38], r10
mov qword [rax + 0x30], r8
lea r8, [rsp + 0xc0]
mov qword [rax + 0x28], r8
lea r8, [rsp + 0xb0]
mov qword [rax + 0x20], r8
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 + 0xbf]
call rax
mov ecx, eax
mov dword [rsp + 0x58], ecx
sub eax, 2
jb 0x18001d7ab
jmp 0x18001d799
mov eax, dword [rsp + 0x58]
sub eax, 3
je 0x18001d86f
jmp 0x18001d8bd
mov rax, qword [rsp + 0xa8]
lea rcx, [rsp + 0xc0]
sub rax, rcx
mov qword [rsp + 0x88], rax
xor eax, eax
cmp rax, qword [rsp + 0x88]
jae 0x18001d82c
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x88]
mov qword [rsp + 0x50], rcx
mov r9, qword [rax + 0x80]
mov r8, qword [rsp + 0x88]
lea rcx, [rsp + 0xc0]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rax
mov rax, qword [rsp + 0x50]
cmp rax, rcx
je 0x18001d82c
call fcn.180016390
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov rax, qword [rsp + 0x78]
mov byte [rax + 0x71], 1
lea rax, [rsp + 0xbf]
cmp qword [rsp + 0xb0], rax
je 0x18001d85e
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
call fcn.180016390
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
mov rax, qword [rsp + 0x78]
mov rdx, qword [rax + 0x80]
mov cl, byte [rsp + 0xbf]
call fcn.18001e9b0
test al, 1
jne 0x18001d894
jmp 0x18001d8a4
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x4c], eax
jmp 0x18001d8ad
call fcn.180016390
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0xa4], eax
jmp 0x18001d8c9
call fcn.180016390
mov dword [rsp + 0xa4], eax
mov eax, dword [rsp + 0xa4]
mov dword [rsp + 0x48], eax
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.18003f420
mov eax, dword [rsp + 0x48]
add rsp, 0xe8
ret