Function at 0x14004e320
Capabilities:
Check if file exists
Create directory
Extract resource via kernel32 functions
Get common file path
Get file attributes
Write file on windows

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0xffa0]
mov eax, 0x100a0
call fcn.1402ed7b0
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x100c0], rbx
mov qword [rsp + 0x100c8], rsi
mov qword [rsp + 0x100d0], rdi
mov qword [rsp + 0x100d8], r12
mov rax, qword [0x14044f8c0]
xor rax, rsp
mov qword [rbp + 0xff90], rax
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14004e760
test dword [rax + 0x88], 0x20000
je 0x14004e760
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14004e79b
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea r15, [0x140393240]
mov rdx, r15
lea rcx, [rsp + 0x40]
call fcn.1400168b0
mov rbx, 0xffffffffffffffff
test al, al
jne 0x14004e3f0
mov rax, rbx
inc rax
cmp word [r15 + rax*2], 0
jne 0x14004e3d4
mov r8d, eax
mov rdx, r15
lea rcx, [rsp + 0x40]
call fcn.140016ad0
nop
lea rdx, [rbp - 0x70]
mov ecx, 0x7fff
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp - 0x70]
mov rax, rbx
nop word [rax + rax]
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x14004e410
xor r12d, r12d
cmp word [rbp + rax*2 - 0x72], 0x5c
jne 0x14004e440
lea rax, [rax*2 - 2]
cmp rax, 0xfffe
jae 0x14004e7b1
mov word [rbp + rax - 0x70], r12w
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14004e45b
xor edx, edx
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r8, str.RtkBtMnt.exe
mov edx, 0x7fff
lea rcx, [rbp - 0x70]
call fcn.1402f38d4
xor r9d, r9d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x14046a640]
call fcn.140169d48
mov edi, eax
mov r14d, 1
test eax, eax
jne 0x14004e4b6
mov r9d, r14d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x14046a640]
call fcn.14016a2dc
mov esi, r12d
test edi, edi
sete sil
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
cmove esi, r14d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14004e7a6
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x58], rax
lea rdi, [0x14039ce84]
mov rdx, rdi
lea rcx, [rsp + 0x58]
call fcn.1400168b0
test al, al
jne 0x14004e53b
mov rax, rbx
nop
inc rax
cmp word [rdi + rax*2], 0
jne 0x14004e520
mov r8d, eax
mov rdx, rdi
lea rcx, [rsp + 0x58]
call fcn.140016ad0
nop
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14004e7b7
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x60], rax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x60]
call fcn.1400168b0
test al, al
jne 0x14004e590
lea rcx, [rbp - 0x70]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14004e574
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x60]
call fcn.140016ad0
nop
mov r8d, r14d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x60]
call fcn.14003d4d0
test esi, esi
je 0x14004e673
call fcn.140155310
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
je 0x14004e744
call fcn.140155310
mov rdx, rdi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x14004e744
call fcn.140155310
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 r14, rax
test rax, rax
je 0x14004e744
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14004e744
mov dword [rsp + 0x68], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0x50]
mov qword [rbp - 0x80], rax
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14004e7c2
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.1400168b0
test al, al
jne 0x14004e6dc
mov rax, rbx
nop word [rax + rax]
inc rax
cmp word [r15 + rax*2], 0
jne 0x14004e6c0
mov r8d, eax
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.140016ad0
nop
call fcn.140162c14
mov rcx, rax
test rax, rax
je 0x14004e790
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x50]
call fcn.1400168b0
test al, al
jne 0x14004e731
lea rcx, [rbp - 0x70]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14004e715
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x50]
call fcn.140016ad0
nop
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x50]
call fcn.14003d4d0
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14004e760
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0xff90]
xor rcx, rsp
call fcn.1402ecc20
lea r11, [rsp + 0x100a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov ecx, 0x80004005
call fcn.140012800
nop
mov ecx, 0x80004005
call fcn.140012800
nop
mov ecx, 0x80004005
call fcn.140012800
int3
call fcn.1402ed414
nop
mov ecx, 0x80004005
call fcn.140012800
nop
mov ecx, 0x80004005
call fcn.140012800
int3