Function at 0x18000507c
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xc0
mov rax, qword [0x180034040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
xor r12d, r12d
mov edi, r12d
mov qword [rbp - 0x49], r12
cmp qword [0x1800341c0], r12
je 0x180005210
lea rbx, [0x1800341b0]
mov rcx, rbx
cmp qword [reloc.OLEAUT32.dll_VariantInit], 7
cmova rcx, qword [0x1800341b0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x180005210
cmp qword [reloc.OLEAUT32.dll_VariantInit], 7
cmova rbx, qword [0x1800341b0]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r12 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rbp + 0x27], rax
inc rax
test rax, 0xfffffffffffffffe
je 0x180005149
mov qword [rbp - 1], r12
lea rdx, [rbp - 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x180005156
mov rcx, qword [rbp + 0x5f]
call fcn.18000748c
mov esi, eax
jmp 0x1800051bb
mov rsi, qword [rbp - 1]
mov rcx, rsi
call fcn.180011d80
mov r14, rax
test rax, rax
je 0x180005179
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.ucrtbase.dll_memset
jmp 0x18000517c
mov r14, r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8d, dword [rbp - 1]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800051d7
mov rcx, qword [rbp + 0x5f]
call fcn.18000748c
mov esi, eax
test r14, r14
je 0x1800051bb
mov r8, r14
xor edx, edx
mov rcx, qword [0x1800375e8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1800054c3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800054c3
mov edx, dword [rbp - 1]
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_SHCreateMemStream]
mov rdi, rax
mov qword [rbp - 0x49], rax
test r14, r14
je 0x180005202
mov r8, r14
xor edx, edx
mov rcx, qword [0x1800375e8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180005297
lea r8, [0x180029330]
mov edx, 0x66
lea r14, [0x180000000]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x18000529f
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbx, rax
test rax, rax
je 0x18000529f
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
jne 0x180005273
mov rcx, qword [rbp + 0x5f]
call fcn.18000748c
mov esi, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x1800054c3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
mov edx, esi
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_SHCreateMemStream]
mov rdi, rax
mov qword [rbp - 0x49], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov rax, rdi
test rax, rax
jne 0x1800052af
mov rcx, qword [rbp + 0x5f]
call fcn.18000748c
mov esi, eax
jmp 0x1800054c3
mov rbx, r12
mov qword [rbp + 0x27], rbx
mov eax, dword [0x1800375f0]
cmp eax, 0x55f0
jae 0x1800052d3
mov rax, qword [0x180037378]
mov rsi, qword [rax + 0x138]
jmp 0x1800052f1
cmp eax, 0x585d
mov rax, qword [0x180037378]
jae 0x1800052ea
mov rsi, qword [rax + 0xf0]
jmp 0x1800052f1
mov rsi, qword [rax + 0xf8]
mov r14, r12
test rsi, rsi
je 0x18000530d
mov rbx, rsi
mov qword [rbp + 0x27], rbx
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov r14, rsi
mov qword [rbp + 0x1f], r12
mov rax, qword [r14]
lea rcx, [rbp + 0x1f]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
lea r8, [0x180028a58]
mov rdx, rdi
mov rcx, r14
call qword [rax + 0x20]
mov esi, eax
test eax, eax
jns 0x180005346
mov rcx, qword [rbp + 0x5f]
mov edx, eax
call fcn.18000211c
jmp 0x1800054a4
mov qword [rbp + 0x17], r12
mov rcx, qword [rbp + 0x1f]
mov rax, qword [rcx]
lea r8, [rbp + 0x17]
xor edx, edx
call qword [rax + 0x68]
mov esi, eax
test eax, eax
jns 0x180005370
mov rcx, qword [rbp + 0x5f]
mov edx, eax
call fcn.18000211c
jmp 0x180005494
mov qword [rbp + 7], r12
mov rax, qword [r14]
lea rdx, [rbp + 7]
mov rcx, r14
call qword [rax + 0x50]
mov esi, eax
test eax, eax
jns 0x180005397
mov rcx, qword [rbp + 0x5f]
mov edx, eax
call fcn.18000211c
jmp 0x180005484
mov qword [rbp - 1], r12
mov rcx, qword [rbp + 7]
mov rax, qword [rcx]
mov dword [rsp + 0x30], r12d
xorps xmm0, xmm0
movsd qword [rsp + 0x28], xmm0
mov qword [rsp + 0x20], r12
xor r9d, r9d
lea r8, [0x180028a68]
mov rdx, qword [rbp + 0x17]
call qword [rax + 0x40]
mov esi, eax
test eax, eax
jns 0x1800053dc
mov rcx, qword [rbp + 0x5f]
mov edx, eax
call fcn.18000211c
jmp 0x180005484
mov qword [rbp + 0xf], r12
mov rax, qword [r14]
lea r9, [rbp + 0xf]
xor r8d, r8d
mov rdx, qword [rbp + 7]
mov rcx, r14
call qword [rax + 0x90]
mov esi, eax
test eax, eax
js 0x180005464
cmp qword [0x180037618], r12
je 0x180005412
lea rcx, [0x180037618]
call fcn.180004988
mov dword [rbp - 0x41], 0x57
mov dword [rbp - 0x3d], 1
mov dword [rbp - 0x39], 0x42c00000
mov qword [rbp - 0x35], 0x42c00000
mov qword [rbp - 0x29], r12
movups xmm0, xmmword [rbp - 0x41]
movups xmmword [rbp - 0x21], xmm0
movups xmm1, xmmword [rbp - 0x31]
movups xmmword [rbp - 0x11], xmm1
mov rax, qword [r15]
lea r9, [0x180037618]
lea r8, [rbp - 0x21]
mov rdx, qword [rbp + 0xf]
mov rcx, r15
call qword [rax + 0x1d0]
mov esi, eax
test eax, eax
jns 0x180005471
mov rcx, qword [rbp + 0x5f]
mov edx, eax
call fcn.18000211c
jmp 0x180005474
mov esi, r12d
cmp qword [rbp + 0xf], r12
je 0x180005484
lea rcx, [rbp + 0xf]
call fcn.180004988
nop
cmp qword [rbp + 7], r12
je 0x180005494
lea rcx, [rbp + 7]
call fcn.180004988
nop
cmp qword [rbp + 0x17], r12
je 0x1800054a4
lea rcx, [rbp + 0x17]
call fcn.180004988
nop
cmp qword [rbp + 0x1f], r12
je 0x1800054b4
lea rcx, [rbp + 0x1f]
call fcn.180004988
nop
test rbx, rbx
je 0x1800054c3
lea rcx, [rbp + 0x27]
call fcn.180004988
nop
test rdi, rdi
je 0x1800054d1
lea rcx, [rbp - 0x49]
call fcn.180004988
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.180022510
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret