Function at 0x140056a30
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x100]
sub rsp, 0x200
xor esi, esi
mov edi, esi
mov dword [rbp + 0x140], esi
mov r13d, 0x16d
lea r12, [0x1404ab890]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
lea r15, [fcn.140065fb0]
xorps xmm0, xmm0
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rsi
movups xmmword [rsp + 0x40], xmm0
nop dword [rax + rax]
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.1401833dc
mov rdx, rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], Ordinal_33
mov qword [rsp + 0x58], Ordinal_33
movups xmm0, xmmword [str.C:WindowsSystem32_ntoskrn.sys]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x14025a520]
movsd qword [rax + 0x10], xmm0
mov ecx, dword [0x14025a528]
mov dword [rax + 0x18], ecx
movzx eax, word [0x14025a52c]
mov word [rdx + 0x1c], ax
movzx eax, byte [reloc.WS2_32.dll_WSAStartup]
mov byte [rdx + 0x1e], al
mov byte [rdx + 0x1f], 0
mov qword [rbp + 0xa0], rdx
mov rax, qword [rsp + 0x50]
mov qword [rbp + 0xa8], rax
call fcn.140182ae0
movaps xmm0, xmmword [rbp + 0xa0]
movdqa xmmword [rsp + 0x60], xmm0
lea r8, [rsp + 0x60]
mov edx, eax
lea rcx, [rbp + 0x80]
call fcn.1400552e0
or edi, 3
lea rcx, [rbp + 0x80]
cmp qword [rbp + 0x98], 7
cmova rcx, qword [rbp + 0x80]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rbp + 0xc0]
call fcn.140182ea8
mov r8d, eax
test eax, eax
jne 0x140056bab
mov edx, dword [rbp + 0xd0]
test dl, 1
mov ecx, 0x1ff
cmovne ecx, r13d
mov dword [rsp + 0x64], ecx
mov ecx, edx
shr ecx, 0xa
test cl, 1
je 0x140056ba0
mov eax, dword [rbp + 0xd4]
cmp eax, 0xa000000c
jne 0x140056b92
mov edx, 4
jmp 0x140056bce
cmp eax, 0xa0000003
jne 0x140056ba0
mov edx, 0xa
jmp 0x140056bce
shr edx, 4
and edx, 1
or edx, 2
jmp 0x140056bce
mov dword [rsp + 0x64], 0xffff
sub eax, 2
je 0x140056bc9
sub eax, 1
je 0x140056bc9
sub eax, 0x32
je 0x140056bc9
cmp eax, 0x46
mov edx, esi
jne 0x140056bce
mov edx, 1
mov dword [rbp + 0xb0], r8d
mov qword [rbp + 0xb8], r12
movaps xmm0, xmmword [rbp + 0xb0]
movdqa xmmword [rsp + 0x60], xmm0
test edx, edx
je 0x140056bf5
cmp edx, 1
setne bl
jmp 0x140056c00
xor ebx, ebx
test r8d, r8d
jne 0x140057150
lea rcx, [rbp + 0x80]
call fcn.140068bd0
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140056c4a
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140056c45
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140056f29
call fcn.140183660
test bl, bl
jne 0x140056f30
lea rax, [0x14025a1f8]
mov qword [rsp + 0x70], rax
lea rcx, [rbp + 0x18]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
or edi, 4
mov dword [rbp + 0x140], edi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
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 + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], r14
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x78], rax
mov byte [rbp - 0xc], bl
mov byte [rbp - 0x17], bl
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 8], rsi
mov rax, qword [0x1404e3898]
mov qword [rbp - 0x14], rax
mov qword [rbp - 0x20], rsi
mov r9d, 0x40
mov r8d, Ordinal_35
lea rdx, str.C:WindowsSystem32_ntoskrn.sys
lea rcx, [rsp + 0x78]
call fcn.1400689b0
test rax, rax
jne 0x140056d27
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
add rcx, rax
xor r8d, r8d
mov edx, 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 + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
je 0x140056ee5
mov r8d, 0x18e6a0
lea rdx, [0x140311f40]
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
cmp qword [rbp - 8], 0
je 0x140056e9f
lea rcx, [rbp - 0x18]
mov rax, qword [rbp - 0x70]
cmp qword [rax], rcx
jne 0x140056d90
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp]
mov qword [rax], rcx
mov rax, qword [rbp - 0x50]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x38]
mov dword [rax], edx
cmp qword [rbp - 0x20], 0
je 0x140056e06
cmp byte [rbp - 0x17], 0
je 0x140056e06
mov rax, qword [rsp + 0x78]
mov r8, qword [rax + 0x18]
mov edx, 0xffffffff
lea rcx, [rsp + 0x78]
cmp r8, r15
jne 0x140056dbc
call fcn.140065fb0
jmp 0x140056dbf
call r8
cmp eax, 0xffffffff
jne 0x140056dc8
xor bl, bl
jmp 0x140056e08
lea rax, [rbp + 0x148]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x100]
lea r8, [rbp + 0xe0]
lea rdx, [rbp - 0x14]
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 0x140056e57
sub eax, 1
je 0x140056e5b
cmp eax, 2
je 0x140056e02
xor bl, bl
jmp 0x140056e08
mov byte [rbp - 0x17], 0
mov bl, 1
mov rcx, qword [rbp - 8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, [rsp + 0x78]
test bl, bl
cmove rcx, rsi
mov rbx, rsi
test eax, eax
cmove rbx, rcx
mov byte [rbp - 0xc], 0
mov byte [rbp - 0x17], 0
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 8], rsi
mov rax, qword [0x1404e3898]
mov qword [rbp - 0x14], rax
mov qword [rbp - 0x20], rsi
test rbx, rbx
jne 0x140056ee5
jmp 0x140056ec5
mov byte [rbp - 0x17], 0
lea rax, [rbp + 0xe0]
mov rbx, qword [rbp + 0x148]
sub rbx, rax
je 0x140056e93
mov r9, qword [rbp - 8]
mov r8, rbx
mov edx, 1
lea rcx, [rbp + 0xe0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x140056e93
xor bl, bl
jmp 0x140056e08
cmp byte [rbp - 0x17], 0
sete bl
jmp 0x140056e08
mov byte [rbp - 0xc], 0
mov byte [rbp - 0x17], 0
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 8], rsi
mov rax, qword [0x1404e3898]
mov qword [rbp - 0x14], rax
mov qword [rbp - 0x20], rsi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
add rcx, rax
xor r8d, r8d
mov edx, 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 + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], r14
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rsp + 0x78]
call fcn.1400661b0
lea rcx, [rbp - 0x80]
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 + 0x18]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
jmp 0x140056a79
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rsi
mov ecx, 0x50
call fcn.1401833dc
mov rcx, rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], 0x41
mov qword [rsp + 0x58], reloc.WLDAP32.dll_Ordinal_79
movaps xmm0, xmmword [str.sc_create_DW_binPathC:WindowsSystem32_ntoskrn.sys_typekernel]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [0x14025a540]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [0x14025a550]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [0x14025a560]
movups xmmword [rax + 0x30], xmm1
movzx eax, byte [reloc.WLDAP32.dll_Ordinal_32]
mov byte [rcx + 0x40], al
mov byte [rcx + 0x41], 0
lea rdx, [rsp + 0x40]
call fcn.140056860
mov dword [rsp + 0x4c], esi
mov qword [rsp + 0x50], ntohl
mov qword [rsp + 0x58], reloc.WS2_32.dll_ntohs
movsd xmm0, qword [str.sc_start_DW]
movsd qword [rsp + 0x40], xmm0
movzx eax, word [0x14025a580]
mov word [rsp + 0x48], ax
movzx eax, byte [0x14025a582]
mov byte [rsp + 0x4a], al
mov byte [rsp + 0x4b], 0
lea rdx, [rsp + 0x40]
call fcn.140056860
lea rcx, [rbp + 0xc0]
call fcn.14021e710
cmp qword [rax + 0x18], 0xf
jbe 0x140057009
mov rax, qword [rax]
mov r9, rax
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp + 0x148], rax
mov rdx, qword [rbp + 0xd8]
cmp rdx, 0xf
jbe 0x140057067
inc rdx
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140057062
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140057062
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140183660
movsd xmm0, qword [str..dd32695]
movsd qword [rsp + 0x60], xmm0
mov eax, dword [0x14025a590]
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x1404e3588], rax
test rax, rax
je 0x140057135
mov dword [rbp + 0x140], esi
mov qword [rsp + 0x38], rsi
lea rcx, [rbp + 0x140]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov r9d, 0xa8
lea r8, [rbp + 0x148]
mov edx, 0x2224a0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov qword [rbp + 0x150], rsi
mov qword [rsp + 0x38], rsi
lea rax, [rbp + 0x140]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x44
lea rax, [rbp + 0x150]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2224a4
mov rcx, qword [0x1404e3588]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rbx, qword [rsp + 0x258]
add rsp, 0x200
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [rbp + 0x80]
lea rdx, [rsp + 0x60]
lea rcx, [0x14025a4e8]
call fcn.140055ec0
int3