Function at 0x140118780
Capabilities:
Check if file exists
Create directory
Create process on windows
Extract resource via kernel32 functions
Get common file path
Get file attributes
Write and execute a file
Write file on windows

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x10190
call fcn.140166d30
sub rsp, rax
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [rsp + 0x101c0], rbx
mov qword [rsp + 0x101c8], rbp
mov qword [rsp + 0x101d0], rsi
mov rax, qword [0x1401ea158]
xor rax, rsp
mov qword [rsp + 0x10180], rax
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140118ea4
bt dword [rax + 0xa8], 0x11
jae 0x140118ea4
call fcn.140129a50
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140118807
mov ecx, 0x80004005
call fcn.140002d80
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
lea rdx, [0x14017f438]
or rsi, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x140118853
movzx edi, dx
mov ecx, edi
call fcn.140138984
test rax, rax
je 0x140118874
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140004d70
mov rbx, qword [rsp + 0x50]
jmp 0x140118874
xor eax, eax
mov rcx, rsi
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x50]
call fcn.1400032e0
mov rbx, qword [rsp + 0x50]
lea rdx, [rsp + 0x180]
mov ecx, 0x7fff
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x180]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + reloc.COMCTL32.dll_Ordinal_380], 0x5c
jne 0x1401188ad
mov word [rsp + rcx*2 + reloc.COMCTL32.dll_Ordinal_380], ax
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1401188d0
xor edx, edx
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r8, str.RtkBtMnt.exe
mov edx, 0x7fff
lea rcx, [rsp + 0x180]
call fcn.140146440
xor r9d, r9d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x140206e90]
call fcn.1401380a8
mov edi, eax
mov r13d, 1
test eax, eax
jne 0x14011892f
mov r9d, r13d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x140206e90]
call fcn.140138148
xor ebp, ebp
test edi, edi
sete bpl
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
cmove ebp, r13d
mov dword [rsp + 0x5c], ebp
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x180]
repne scasw ax, word [rdi]
not rcx
sub rcx, r13
mov rdi, rcx
test ecx, ecx
jne 0x1401189cb
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140118a53
cmp dword [rdx + 0x10], eax
jge 0x14011899d
cmp dword [rbx - 0xc], eax
jge 0x140118992
mov ecx, 0x80070057
call fcn.140002d80
int3
mov dword [rbx - 0x10], eax
mov word [rbx], ax
jmp 0x140118a53
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1401189b4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
jmp 0x140118a53
mov ebp, dword [rbx - 0x10]
lea r12, [rsp + 0x180]
sub r12, rbx
sar r12, 1
mov ecx, r13d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x1401189fc
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.140002da0
mov rbx, qword [rsp + 0x50]
cmp r12, rbp
ja 0x140118a1c
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rbx + r12*2]
mov r9, rbp
mov rdx, rbp
mov rcx, rbx
call fcn.140144840
jmp 0x140118a39
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [rsp + 0x180]
mov rdx, rbp
mov rcx, rbx
call fcn.1401448d0
test edi, edi
js 0x140118e99
cmp edi, dword [rbx - 0xc]
jg 0x140118e99
mov dword [rbx - 0x10], edi
mov word [rbx + rbp], 0
xor eax, eax
mov rcx, rsi
lea r12, [0x140199978]
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r15, [rcx - 1]
mov rbp, r12
sub rbp, rbx
sar rbp, 1
mov r14d, dword [rbx - 0x10]
lea edi, [r14 + rcx - 1]
mov edx, r13d
sub edx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, edx
jge 0x140118a9e
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.140002da0
mov rbx, qword [rsp + 0x50]
cmp rbp, r14
ja 0x140118aa7
lea r12, [rbx + rbp*2]
movsxd rdx, r15d
add rdx, rdx
lea rcx, [rbx + r14*2]
mov r9, rdx
mov r8, r12
call fcn.1401448d0
test edi, edi
js 0x140118e8e
cmp edi, dword [rbx - 0xc]
jg 0x140118e8e
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], 0
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rsp + 0xa0]
call fcn.1401489d0
mov dword [rsp + 0xa0], 0x68
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x40], rax
xor r14d, r14d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140118b53
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140118b77
or edx, 0xffffffff
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x5c], r14d
je 0x140118cc6
call fcn.14013c178
lea r8, str.Binary
mov edx, 0x143
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
jne 0x140118bc7
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140118ea4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118ea4
call fcn.14013c178
mov rdx, rdi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test eax, eax
jne 0x140118c01
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140118ea4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118ea4
call fcn.14013c178
mov rdx, rdi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r12, rax
test rax, rax
jne 0x140118c46
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140118ea4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118ea4
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140118c9f
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, eax
test esi, esi
jg 0x140118ea4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118ea4
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x58]
mov r8d, ebp
mov rdx, r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, rsi
lea rdi, [rsp + 0x180]
repne scasw ax, word [rdi]
not rcx
sub rcx, r13
mov rdi, rcx
test ecx, ecx
jne 0x140118d42
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140118dc8
cmp dword [rdx + 0x10], eax
jge 0x140118d14
cmp dword [rbx - 0xc], eax
jge 0x140118d08
mov ecx, 0x80070057
call fcn.140002d80
int3
mov dword [rbx - 0x10], r14d
mov word [rbx], ax
jmp 0x140118dc8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140118d2b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
jmp 0x140118dc8
mov ebp, dword [rbx - 0x10]
lea r12, [rsp + 0x180]
sub r12, rbx
sar r12, 1
sub r13d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, ecx
or eax, r13d
jge 0x140118d72
mov edx, ecx
lea rcx, [rsp + 0x50]
call fcn.140002da0
mov rbx, qword [rsp + 0x50]
cmp r12, rbp
ja 0x140118d92
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rbx + r12*2]
mov r9, rbp
mov rdx, rbp
mov rcx, rbx
call fcn.140144840
jmp 0x140118daf
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [rsp + 0x180]
mov rdx, rbp
mov rcx, rbx
call fcn.1401448d0
test edi, edi
js 0x140118e83
cmp edi, dword [rbx - 0xc]
jg 0x140118e83
mov dword [rbx - 0x10], edi
mov word [rbx + rbp], r14w
test rbx, rbx
je 0x140118e68
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rsp + 0x110]
call fcn.1401489d0
mov dword [rsp + 0x110], 0x68
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140118e4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140118e68
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140118ea4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140118ea4
mov ecx, 0x80070057
call fcn.140002d80
int3
mov ecx, 0x80070057
call fcn.140002d80
int3
mov ecx, 0x80070057
call fcn.140002d80
nop
mov rcx, qword [rsp + 0x10180]
xor rcx, rsp
call fcn.1401447b0
lea r11, [rsp + 0x10190]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret