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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov rax, qword [0x140047008]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov esi, r9d
mov rdi, r8
mov rbx, rdx
mov r15, rcx
mov qword [rbp - 0x70], r8
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp]
call fcn.140010440
lea rdx, [rbp]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov qword [rbp - 0x50], 7
mov qword [rbp - 0x58], r12
mov word [rbp - 0x68], r12w
cmp word [rbp], r12w
jne 0x1400030a9
mov r8d, r12d
jmp 0x1400030bc
lea rax, [rbp]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], 0
jne 0x1400030b1
lea rdx, [rbp]
lea rcx, [rbp - 0x68]
call fcn.140005780
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp - 0x68]
call fcn.1400050d0
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rdx, qword [rbp - 0x68]
lea r8, [0x14003dc6c]
lea rcx, [rbp - 0x78]
call fcn.14001b360
test eax, eax
jne 0x14000319a
mov rcx, qword [rbp - 0x78]
call fcn.14001b210
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
cmp qword [rbx + 0x18], 8
jb 0x140003124
mov rax, qword [rbx]
jmp 0x140003127
mov rax, rbx
mov word [rax], r12w
lea rdx, [rbp - 0x68]
mov rcx, rbx
call fcn.140005010
nop
mov r8, qword [rbp - 0x50]
cmp r8, 8
jb 0x140003152
inc r8
mov rdx, qword [rbp - 0x68]
lea rcx, [rbp - 0x68]
call fcn.140005670
mov word [rbp - 0x68], r12w
mov qword [rbp - 0x58], r12
mov qword [rbp - 0x50], 7
mov r8, qword [rdi + 0x18]
cmp r8, 8
jb 0x14000317b
inc r8
mov rdx, qword [rdi]
mov rcx, rdi
call fcn.140005670
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], r12
cmp qword [rdi + 0x18], 8
jb 0x140003191
mov rdi, qword [rdi]
mov word [rdi], r12w
jmp 0x140003372
movzx edx, si
mov r8d, 0x12c
mov rcx, qword [r15 + 8]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
jne 0x1400031eb
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
cmp qword [rbx + 0x18], 8
jb 0x1400031cd
mov rax, qword [rbx]
jmp 0x1400031d0
mov rax, rbx
mov word [rax], r12w
xor r8d, r8d
lea rdx, [0x14003df20]
mov rcx, rbx
call fcn.140005780
jmp 0x140003138
mov rdx, rsi
mov rcx, qword [r15 + 8]
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x14000321c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
cmp qword [rbx + 0x18], 8
jb 0x140003325
mov rax, qword [rbx]
jmp 0x140003328
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
je 0x1400031fd
mov rdx, rsi
mov rcx, qword [r15 + 8]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x1400031fd
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rdx, qword [rbp - 0x68]
lea r8, [0x14003dc70]
lea rcx, [rbp - 0x80]
call fcn.14001b360
test eax, eax
jne 0x1400031fd
lea rax, vtable.std::_Func_impl_class__lambda_94d640c5827ed1f472afcb978ee94a88___class_std::allocator_int___void___.0
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x68], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x78], rax
mov qword [rbp - 8], r12
lea rdx, [rbp - 0x40]
lea rcx, [rsp + 0x30]
call qword [method.std::_Func_impl_class__lambda_94d640c5827ed1f472afcb978ee94a88___class_std::allocator_int___void___.virtual_0]
mov qword [rbp - 8], rax
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400032c4
mov rax, qword [rcx]
lea rdx, [rsp + 0x30]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov rcx, r12
mov qword [rsp + 0x68], rcx
test rcx, rcx
je 0x1400032db
mov rax, qword [rcx]
lea rdx, [rsp + 0x30]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
nop
mov r8, rsi
mov r9, qword [rbp - 0x80]
mov edx, 1
mov rcx, r14
call fcn.14001b5f8
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
cmp qword [rbx + 0x18], 8
jb 0x140003307
mov rax, qword [rbx]
jmp 0x14000330a
mov rax, rbx
mov word [rax], r12w
lea rdx, [rbp - 0x68]
mov rcx, rbx
call fcn.140005010
lea rcx, [rbp - 0x40]
call fcn.140001b00
jmp 0x14000333f
mov rax, rbx
mov word [rax], r12w
xor r8d, r8d
lea rdx, [0x14003df20]
mov rcx, rbx
call fcn.140005780
nop
mov r8, qword [rbp - 0x50]
cmp r8, 8
jb 0x140003359
inc r8
mov rdx, qword [rbp - 0x68]
lea rcx, [rbp - 0x68]
call fcn.140005670
mov qword [rbp - 0x50], 7
mov qword [rbp - 0x58], r12
mov word [rbp - 0x68], r12w
mov rcx, rdi
call fcn.140005230
mov rax, rbx
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.14000d6b0
add rsp, 0x320
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret