Function at 0x140003840
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x460
mov rax, qword [0x14002e260]
xor rax, rsp
mov qword [rsp + 0x450], rax
mov rax, qword [rsp + 0x4c0]
mov rbp, qword [rsp + 0x4d0]
mov r15, qword [rsp + 0x4d8]
mov rbx, qword [rsp + 0x4e0]
mov r12, qword [rsp + 0x4e8]
mov qword [rsp + 0x20], rax
movzx edi, r9b
mov r14, r8
mov rsi, rdx
movzx r13d, cl
test r9b, r9b
je 0x1400038f7
cmp word [rbx], 0
jne 0x1400038f7
lea rcx, [rsp + 0x240]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rcx, [rsp + 0x240]
mov edx, 0x5c
call fcn.140009794
xor ecx, ecx
lea r8, [rsp + 0x240]
mov word [rax], cx
lea rdx, str._s_s
lea rcx, [rsp + 0x30]
mov r9, rbp
call fcn.140007ff8
jmp 0x140003919
lea rdx, str._sADMIN__s
lea rcx, [rsp + 0x30]
mov r9, rbp
call fcn.140007ff8
mov r8, r12
mov rdx, rbx
mov rcx, r14
call fcn.140003700
lea r8, [0x140021bb8]
mov rdx, r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbp, rax
test rax, rax
je 0x1400039bf
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdx, rbp
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rbx
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
lea rdx, [0x140021bc8]
lea rcx, [rsp + 0x30]
mov r12, rax
call fcn.140009e20
mov rbx, rax
test rax, rax
je 0x1400039bf
mov r8d, ebp
mov r9, rax
mov edx, 1
mov rcx, r12
call fcn.140009be0
mov rcx, rbx
call fcn.1400098c0
mov al, 1
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.140008390
mov rbx, qword [rsp + 0x4a0]
add rsp, 0x460
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test r13b, r13b
jne 0x1400039cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x140003992
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x1400039ed
cmp eax, 0x52e
je 0x1400039ed
cmp eax, 0x3e7
je 0x1400039ed
cmp eax, 0x35
jne 0x1400039fe
lea rdx, [rsp + 0x30]
mov rcx, r15
call fcn.140002960
test al, al
jne 0x140003992
call fcn.1400024b0
cmp byte [rsp + 0x4f0], 0
je 0x140003ad0
call fcn.140008c34
lea rcx, [rax + 0x60]
test dil, dil
je 0x140003a2d
mov r8, qword [rsp + 0x20]
lea rdx, str._rCouldnt_install__s_service:_n
jmp 0x140003a37
mov r8, rsi
lea rdx, str._rCouldnt_access__s:_n
call fcn.140008fbc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov ebx, eax
call fcn.140003030
cmp ebx, 0x43
je 0x140003a95
cmp ebx, 0x35
je 0x140003a95
lea eax, [rbx - 0x4cf]
cmp eax, 1
ja 0x140003ad0
call fcn.140008c34
add rax, 0x60
mov rcx, rax
test dil, dil
je 0x140003a8c
lea rdx, str._nMake_sure_that_file_and_print_sharing_services_are_enabled._n
call fcn.140008fbc
mov rcx, r14
call fcn.1400037e0
xor al, al
jmp 0x140003994
lea rdx, str._nMake_sure_that_file_and_print_sharing_services_are_enabled_on__s._n
jmp 0x140003ac8
call fcn.140008c34
add rax, 0x60
mov rcx, rax
test dil, dil
je 0x140003ac1
lea rdx, str._nMake_sure_that_the_admin__share_is_enabled._n
call fcn.140008fbc
mov rcx, r14
call fcn.1400037e0
xor al, al
jmp 0x140003994
lea rdx, str._nMake_sure_that_the_default_admin__share_is_enabled_on__s._n
mov r8, rsi
call fcn.140008fbc
mov rcx, r14
call fcn.1400037e0
xor al, al
jmp 0x140003994