Function at 0x41dab0
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.004e6570
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 [0x00535d58]
xor rax, rsp
mov qword [rsp + 0x10180], rax
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x41e1b0
bt dword [rax + 0x4c], 0x11
jae 0x41e1b0
call fcn.0049d8dc
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x41db34
mov ecx, 0x80004005
call fcn.004034c0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
lea rdx, [0x004f7838]
or rsi, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x41db80
movzx edi, dx
mov ecx, edi
call fcn.0049f018
test rax, rax
je 0x41dba1
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.0040a480
mov rbx, qword [rsp + 0x50]
jmp 0x41dba1
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.00409ff0
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 + 0x17c], 0x5c
jne 0x41dbda
mov word [rsp + rcx*2 + 0x17c], ax
lea rcx, [rsp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41dbfd
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.004c8820
xor r9d, r9d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x0053fac0]
call fcn.004a0ffc
mov edi, eax
mov r13d, 1
test eax, eax
jne 0x41dc5c
mov r9d, r13d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x0053fac0]
call fcn.004a108c
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 0x41dcf8
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x41dd80
cmp dword [rdx + 0x10], eax
jge 0x41dcca
cmp dword [rbx - 0xc], eax
jge 0x41dcbf
mov ecx, 0x80070057
call fcn.004034c0
int3
mov dword [rbx - 0x10], eax
mov word [rbx], ax
jmp 0x41dd80
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x41dce1
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 0x41dd80
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 0x41dd29
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.004034e0
mov rbx, qword [rsp + 0x50]
cmp r12, rbp
ja 0x41dd49
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rbx + r12*2]
mov r9, rbp
mov rdx, rbp
mov rcx, rbx
call fcn.004c8350
jmp 0x41dd66
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [rsp + 0x180]
mov rdx, rbp
mov rcx, rbx
call fcn.004c80e0
test edi, edi
js 0x41e1a5
cmp edi, dword [rbx - 0xc]
jg 0x41e1a5
mov dword [rbx - 0x10], edi
mov word [rbx + rbp], 0
xor eax, eax
mov rcx, rsi
lea r12, [0x004f8e90]
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 0x41ddcb
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.004034e0
mov rbx, qword [rsp + 0x50]
cmp rbp, r14
ja 0x41ddd4
lea r12, [rbx + rbp*2]
movsxd rdx, r15d
add rdx, rdx
lea rcx, [rbx + r14*2]
mov r9, rdx
mov r8, r12
call fcn.004c80e0
test edi, edi
js 0x41e19a
cmp edi, dword [rbx - 0xc]
jg 0x41e19a
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.004cb030
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]
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 0x41dfe7
call fcn.00491aa0
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 0x41dee8
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x41e1b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x41e1b0
call fcn.00491aa0
mov rdx, rdi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test eax, eax
jne 0x41df22
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x41e1b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x41e1b0
call fcn.00491aa0
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 0x41df67
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x41e1b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x41e1b0
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 0x41dfc0
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, eax
test esi, esi
jg 0x41e1b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x41e1b0
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 0x41e063
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x41e0e9
cmp dword [rdx + 0x10], eax
jge 0x41e035
cmp dword [rbx - 0xc], eax
jge 0x41e029
mov ecx, 0x80070057
call fcn.004034c0
int3
mov dword [rbx - 0x10], r14d
mov word [rbx], ax
jmp 0x41e0e9
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x41e04c
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 0x41e0e9
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 0x41e093
mov edx, ecx
lea rcx, [rsp + 0x50]
call fcn.004034e0
mov rbx, qword [rsp + 0x50]
cmp r12, rbp
ja 0x41e0b3
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rbx + r12*2]
mov r9, rbp
mov rdx, rbp
mov rcx, rbx
call fcn.004c8350
jmp 0x41e0d0
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [rsp + 0x180]
mov rdx, rbp
mov rcx, rbx
call fcn.004c80e0
test edi, edi
js 0x41e18f
cmp edi, dword [rbx - 0xc]
jg 0x41e18f
mov dword [rbx - 0x10], edi
mov word [rbx + rbp], r14w
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rsp + 0x110]
call fcn.004cb030
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]
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 0x41e1b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x41e1b0
mov ecx, 0x80070057
call fcn.004034c0
int3
mov ecx, 0x80070057
call fcn.004034c0
int3
mov ecx, 0x80070057
call fcn.004034c0
nop
mov rcx, qword [rsp + 0x10180]
xor rcx, rsp
call fcn.004c7bc0
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