Function at 0x140007690
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get file attributes
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push rbp
push r13
push r14
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x380], rax
xor r13d, r13d
xor ecx, ecx
mov r12d, r13d
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, r13d
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x50], r13d
mov r14, rax
test rax, rax
je 0x1400079fc
mov edi, 0x64
mov qword [rsp + 0x58], 0xa
lea r9, [rsp + 0x48]
mov qword [rsp + 0x60], rdi
lea r8d, [r13 + 3]
mov qword [rsp + 0x68], r13
lea rdx, [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.ntdll.dll_LdrFindResource_U]
test eax, eax
js 0x14000773d
mov rdx, qword [rsp + 0x48]
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.ntdll.dll_LdrAccessResource]
test eax, eax
cmovns esi, dword [rsp + 0x50]
cmp qword [rsp + 0x40], r12
je 0x1400079fc
movzx ecx, word [0x14000d980]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x4b0], rbx
test cx, cx
je 0x140007780
lea rdx, [0x14000d980]
lea r8, [rsp + 0x70]
sub rdx, r8
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x140007770
mov word [rax], r13w
lea rbx, [rsp + 0x70]
movzx ecx, word [rsp + 0x70]
test cx, cx
je 0x14000779d
add rbx, 2
cmp word [rbx], r12w
jne 0x140007793
lea rax, [rsp + 0x70]
sub rbx, rax
lea rax, [rsp + 0x70]
sar rbx, 1
test cx, cx
je 0x1400077bc
add rax, 2
cmp word [rax], r12w
jne 0x1400077b2
lea rcx, [0x14000ad50]
sub rcx, rax
nop word [rax + rax]
mov word [rax], di
lea rax, [rax + 2]
movzx edi, word [rcx + rax]
test di, di
jne 0x1400077d0
lea rcx, [rsp + 0x70]
mov word [rax], r13w
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000780f
mov edx, 0x80
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], r13d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400079b6
mov rdx, qword [rsp + 0x40]
lea r9, [rsp + 0x54]
mov r8d, esi
mov qword [rsp + 0x20], r13
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12d, r12d
je 0x1400079b6
lea r9, [rsp + 0x48]
mov qword [rsp + 0x40], r13
mov r8d, 3
mov dword [rsp + 0x50], r13d
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x58], 0xa
mov rcx, r14
mov qword [rsp + 0x60], 0x65
mov esi, r13d
mov qword [rsp + 0x68], r13
call qword [sym.imp.ntdll.dll_LdrFindResource_U]
test eax, eax
js 0x1400078d4
mov rdx, qword [rsp + 0x48]
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.ntdll.dll_LdrAccessResource]
test eax, eax
cmovns esi, dword [rsp + 0x50]
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x1400079ed
add rbx, rbx
cmp rbx, 0x410
jae 0x140007a0b
mov word [rsp + rbx + 0x70], r13w
lea rax, [rsp + 0x70]
cmp word [rsp + 0x70], r13w
je 0x14000790f
add rax, 2
cmp word [rax], r13w
jne 0x140007905
lea r8, [0x14000ad68]
mov ecx, 0x73
sub r8, rax
nop
mov word [rax], cx
lea rax, [rax + 2]
movzx ecx, word [r8 + rax]
test cx, cx
jne 0x140007920
lea rcx, [rsp + 0x70]
mov word [rax], r13w
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140007960
mov edx, 0x80
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], r13d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400079b6
lea r9, [rsp + 0x54]
mov qword [rsp + 0x20], r13
mov r8d, esi
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r12d
mov rbx, qword [rsp + 0x4b0]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400081d0
lea r11, [rsp + 0x490]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret
mov ecx, 0x716
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400079b9
mov ecx, 0x716
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400079c1
call fcn.140008304
int3