Function at 0x180212dec
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3d8]
sub rsp, 0x4a0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x18032a080]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov rdi, r9
mov dword [rsp + 0x60], r8d
mov rsi, rdx
mov rbx, rcx
mov r15d, 1
or r12, 0xffffffffffffffff
test rdx, rdx
jne 0x18021308b
call fcn.1801dc1a8
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.1801e2ed8
nop
call fcn.1801dc1b0
mov rcx, rax
call fcn.1801e3a78
test al, al
je 0x180212f19
mov rdx, rbx
lea rcx, [rbp - 0x50]
call fcn.1801e32a8
lea rcx, [rbp - 0x50]
call fcn.180087940
mov rcx, rax
and qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, r12
jne 0x180212ec2
lea rcx, [rbp - 0x50]
call fcn.1801e3048
jmp 0x1802130d6
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x180212eb4
and dword [rsp + 0x50], 0
mov ecx, esi
call fcn.18022afbc
mov r14, rax
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, esi
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x50], esi
je 0x18021307d
mov rcx, r14
call fcn.18022acec
jmp 0x180212eb4
call fcn.1801dc1b0
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.1801e3280
call fcn.1801dc1c0
mov rdx, rax
lea rcx, [rbp + 0xd0]
call fcn.1801e2ed8
nop
call fcn.1801dc4e4
test al, al
je 0x180212f52
call fcn.1801dc1b8
mov rdi, rax
jmp 0x180212f8f
lea rcx, [rbp + 0xd0]
call fcn.180087940
mov rcx, rax
xor edx, edx
call fcn.1801e1fc4
mov rsi, rax
lea rcx, [rbp - 0x50]
call fcn.180087940
mov rcx, rax
mov rdx, rsi
call fcn.1802046b8
mov rdi, rax
test rsi, rsi
je 0x180212f8f
mov rcx, rsi
call fcn.18022acec
test rdi, rdi
jne 0x180212fa5
lea rcx, [rbp + 0xd0]
call fcn.1801e3048
jmp 0x180212eb4
and dword [rsp + 0x54], 0
mov r8d, r12d
mov rdx, rbx
lea rcx, [rbp + 0x40]
call fcn.1801e2f08
nop
lea r8, [0x1802898dc]
lea rdx, [0x18026cd74]
lea rcx, [rbp + 0x40]
call fcn.1801e3cb4
lea rcx, [rbp + 0x40]
call fcn.180087940
mov rdx, rax
lea rax, [rbp + 0x160]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x54]
mov r8b, r15b
mov rcx, rdi
call fcn.1802040b8
test eax, eax
je 0x180213008
lea rcx, [rbp + 0x40]
call fcn.1801e3048
jmp 0x180212f94
mov esi, dword [rbp + 0x38c]
test esi, esi
je 0x180212ffd
mov ecx, esi
call fcn.18022afbc
mov r14, rax
mov r9d, esi
mov r8, rax
mov edx, dword [rsp + 0x54]
mov rcx, rdi
call fcn.180204bb4
test eax, eax
je 0x180213054
cmp eax, 0x600
je 0x180213054
mov rcx, r14
call fcn.18022acec
call fcn.1801dc4e4
test al, al
jne 0x180212ffd
mov rcx, rdi
call fcn.180203df8
jmp 0x180212ffd
call fcn.1801dc4e4
test al, al
jne 0x180213066
mov rcx, rdi
call fcn.180203df8
nop
lea rcx, [rbp + 0x40]
call fcn.1801e3048
nop
lea rcx, [rbp + 0xd0]
call fcn.1801e3048
nop
lea rcx, [rbp - 0x50]
call fcn.1801e3048
jmp 0x180213318
test r9, r9
jne 0x180213098
call fcn.1801dc194
mov rdi, rax
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x1802130d0
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r13, rax
test rax, rax
jne 0x1802132d2
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15d, 1
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, r12
je 0x1802133fa
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x1802133fa
and dword [rsp + 0x58], 0
mov ecx, esi
call fcn.18022afbc
mov r14, rax
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov r8d, esi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x58], esi
je 0x180213164
mov rcx, r14
call fcn.18022acec
xor r14d, r14d
test r14, r14
je 0x1802133fa
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x4c]
mov edx, esi
mov rcx, r14
call fcn.1800d99a0
mov rbx, rax
mov rcx, r14
call fcn.18022acec
test rbx, rbx
je 0x1802133fa
xor edx, edx
lea r8d, [rdx + 0x2c]
lea rcx, [rsp + 0x78]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x78], 0x28
mov ecx, dword [rsp + 0x4c]
mov dword [rsp + 0x7c], ecx
mov eax, dword [rsp + 0x48]
neg eax
mov dword [rbp - 0x80], eax
mov dword [rbp - 0x7c], 0x200001
and dword [rbp - 0x78], 0
imul ecx, dword [rsp + 0x48]
shl ecx, 2
mov dword [rbp - 0x74], ecx
xor r13b, r13b
and qword [rsp + 0x40], 0
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
xor r8d, r8d
lea rdx, [rsp + 0x78]
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov rdi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1802133fa
xor r10d, r10d
mov eax, dword [rsp + 0x4c]
imul eax, dword [rsp + 0x48]
test eax, eax
jle 0x1802133aa
lea r8, [rbx + 3]
lea rdi, [r10 - 2]
sub rdi, rbx
sub r12, rbx
lea rsi, [r10 - 3]
sub rsi, rbx
mov r9, r8
sub r9, rbx
mov cl, byte [r8]
mov rax, qword [rsp + 0x40]
mov byte [rax + r9], cl
lea r11, [r8 + rsi]
lea r14, [rdi + r8]
lea r15, [r12 + r8]
cmp cl, 0xff
jae 0x180213326
movzx ecx, byte [r8 - 1]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x40]
mov byte [rax + r11], dl
movzx ecx, byte [r8 - 2]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x40]
mov byte [r14 + rax], dl
movzx ecx, byte [r8 - 3]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x40]
mov byte [r15 + rax], dl
mov r13b, 1
jmp 0x18021334d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x1802130d0
mov ecx, esi
call fcn.18022afbc
mov r14, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8d, esi
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15d, 1
test r14, r14
jne 0x18021316d
jmp 0x1802130d6
mov cl, byte [r8 - 1]
mov rax, qword [rsp + 0x40]
mov byte [rax + r11], cl
mov cl, byte [r8 - 2]
mov rax, qword [rsp + 0x40]
mov byte [r14 + rax], cl
mov cl, byte [r8 - 3]
mov rax, qword [rsp + 0x40]
mov byte [r15 + rax], cl
mov rax, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x60]
cmp dword [rax + r11], ecx
jne 0x180213386
xor ecx, ecx
mov byte [rax + r11], cl
mov rax, qword [rsp + 0x40]
mov byte [r14 + rax], cl
mov rax, qword [rsp + 0x40]
mov byte [r15 + rax], cl
mov rax, qword [rsp + 0x40]
mov byte [rax + r9], cl
lea r15d, [rcx + 1]
mov r13b, r15b
jmp 0x18021338c
mov r15d, 1
add r10d, r15d
add r8, 4
mov eax, dword [rsp + 0x4c]
imul eax, dword [rsp + 0x48]
cmp r10d, eax
jl 0x180213249
mov rdi, qword [rsp + 0x58]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ecx, 0xb8
call fcn.18022a7fc
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x1802133d4
lea rcx, [rax + 0x28]
call fcn.1801e2f30
jmp 0x1802133d6
xor ebx, ebx
and qword [rbx + 8], 0
and qword [rbx + 0x10], 0
mov qword [rbx], rdi
mov ecx, dword [rsp + 0x4c]
mov dword [rbx + 0x18], ecx
mov ecx, dword [rsp + 0x48]
mov dword [rbx + 0x1c], ecx
mov byte [rbx + 0x20], r13b
mov rax, rbx
jmp 0x1802133fc
xor eax, eax
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.18022a7d0
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret