Function at 0x180012890
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov rbx, rdx
mov rdi, rcx
mov qword [rbp + 0x60], rcx
xor r15d, r15d
mov edx, 0x68
mov r8d, 0xa
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x180012a9f
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r14d, eax
test eax, eax
je 0x180012ac2
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x180012ae5
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x180012b08
lea rdx, [rbp + 0x180]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x180012b2b
lea r8, str.zlib1.dll
mov edx, 0x104
lea rcx, [rbp + 0x180]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
test eax, eax
jne 0x180012b4e
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x50]
call fcn.180014590
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 6
jne 0x180012b71
mov r8d, r14d
mov rdx, rbx
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x58]
call fcn.180016bd0
test rax, rax
jne 0x1800129dc
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x60], 6
jne 0x180012a7c
mov qword [rbp + 0x60], r15
mov rbx, 0xffffffffffffffff
mov qword [rsp + 0x20], rbx
lea r9, [rbp + 0x180]
mov r8d, 0x104
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x60]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], r15
lea rax, [rbp + 0x70]
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x180012a30
mov r8, rbx
lea rdx, [rbp + 0x70]
mov rcx, rdi
call fcn.180019d80
nop
lea rcx, [rsp + 0x50]
call fcn.1800044f0
mov rax, rdi
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.1800346e0
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x4a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.Error_occurred_while_writing_the_file.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Failed_to_find_resource.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_get_resource_size.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_load_resource.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_lock_resource.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_get_temp_path.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_concatenate_path.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Failed_to_open_file_for_writing.
lea rcx, [rsp + 0x30]
call fcn.180001440
lea rdx, [0x1800434b0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3