Function at 0x140012074
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0xd8]
sub rsp, 0x1b0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x140031020]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov rdi, r8
mov r14, rdx
mov rbx, rcx
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
xor r15d, r15d
test eax, eax
je 0x140012330
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x1400120d1
mov rdx, qword [rdi]
lea rcx, [rbp + 0x18]
call qword [sym.imp.Wex.Common.dll_public:_static_class_TAEF::Common::String___cdecl_TAEF::Common::Environment::ExpandStrings_unsigned_short_int_const____ptr64_]
nop
cmp qword [rax + 0x18], 8
jb 0x1400120e6
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r15w
jne 0x1400120ef
mov qword [rsp + 0x48], rcx
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x40]
call fcn.140002aa8
nop
lea rcx, [rbp + 0x18]
call fcn.140001d00
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x68], xmm0
mov qword [rbp + 0x78], rax
lea rcx, [rbx + 0xd0]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x68]
call fcn.140012ec0
nop
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x80]
call qword [sym.imp.Wex.Common.dll_class_std::filesystem::path___cdecl_TAEF::Common::FileInfo::GetDirectory_class_std::filesystem::path_const____ptr64_]
nop
lea rcx, [rbp + 0x80]
call qword [sym.imp.Wex.Common.dll_long_int___cdecl_TAEF::Common::Directory::Create_class_std::filesystem::path_const____ptr64_]
mov ebx, eax
test eax, eax
js 0x140012350
lea rcx, [rbp + 0x40]
cmp qword [rbp + 0x58], 8
cmovae rcx, qword [rbp + 0x40]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rbp + 0x60], rax
inc rax
test rax, 0xfffffffffffffffe
je 0x1400123a7
mov rsi, qword [r14 + 8]
sub rsi, qword [r14]
je 0x1400121e5
mov dword [rbp + 0x38], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x38]
mov r8d, esi
mov rdx, qword [r14]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14001240b
mov eax, dword [rbp + 0x38]
cmp rax, rsi
jne 0x1400122e0
lea rax, [rbp + 0x40]
cmp rdi, rax
je 0x140012243
lea r9, [rbp + 0x40]
cmp qword [rbp + 0x58], 8
cmovae r9, qword [rbp + 0x40]
mov rax, qword [rbp + 0x50]
cmp rax, qword [rdi + 0x18]
ja 0x140012230
mov rsi, rdi
cmp qword [rdi + 0x18], 8
jb 0x140012213
mov rsi, qword [rdi]
mov qword [rdi + 0x10], rax
lea rdi, [rax + rax]
mov r8, rdi
mov rdx, r9
mov rcx, rsi
call fcn.140019da0
mov word [rdi + rsi], r15w
jmp 0x140012243
lfence
mov rdx, qword [rbp + 0x50]
mov rcx, rdi
call fcn.140002b64
mov rbx, qword [rbp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp + 0x80]
call fcn.140001d00
nop
mov rcx, qword [rbp + 0x78]
test rcx, rcx
je 0x140012269
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x70]
test rcx, rcx
je 0x1400122b1
or eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1400122b1
mov rbx, qword [rbp + 0x70]
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x14001f740]
or eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400122b1
mov rcx, qword [rbp + 0x70]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14001f740]
nop
lea rcx, [rbp + 0x40]
call fcn.140001d00
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140018430
mov rbx, qword [rsp + 0x1f8]
add rsp, 0x1b0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
movups xmmword [rbp - 0x38], xmm0
lea rcx, [rbp - 0x48]
call fcn.1400015a4
mov r10, rax
mov rcx, rdi
call fcn.140002ce4
mov r9, rax
lea r8, str.Failed_to_write_all_the_data_to_the_destination_file:___s_
lea rdx, [rbp + 8]
mov rcx, r10
call fcn.140001cc0
mov rdx, rax
mov r9d, 0x187
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceHost.cpp
mov ecx, 0x80004005
call fcn.140001a0c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov r9d, 0x16e
call fcn.140013830
nop
lfence
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
movups xmmword [rsp + 0x68], xmm0
lea rcx, [rsp + 0x58]
call fcn.1400015a4
mov r10, rax
lea rcx, [rbp + 0x80]
call fcn.140002ce4
mov r9, rax
lea r8, str.Failed_to_create_the_directory_to_contain_the_deployed_file_on_the_target_machine:___s_
lea rdx, [rbp - 0x28]
mov rcx, r10
call fcn.140001cc0
mov rdx, rax
mov r9d, 0x17a
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceHost.cpp
mov ecx, ebx
call fcn.140001a0c
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
lea rcx, [rsp + 0x78]
call fcn.1400015a4
mov r10, rax
mov rcx, rdi
call fcn.140002ce4
mov r9, rax
lea r8, str.Failed_to_create_the_destination_file:___s_
lea rdx, [rbp - 0x18]
mov rcx, r10
call fcn.140001cc0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov r9d, 0x17e
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceHost.cpp
mov rdx, rbx
call fcn.140001a0c
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
movups xmmword [rbp - 0x58], xmm0
lea rcx, [rbp - 0x68]
call fcn.1400015a4
mov r10, rax
mov rcx, rdi
call fcn.140002ce4
mov r9, rax
lea r8, str.Failed_to_write_to_the_destination_file:___s_
lea rdx, [rbp - 8]
mov rcx, r10
call fcn.140001cc0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov r9d, 0x185
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceHost.cpp
mov rdx, rbx
call fcn.140001a0c
int3