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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x140148020]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rdi, r9
mov dword [rsp + 0x60], r8d
mov rbx, rcx
mov r15d, 1
xor r12d, r12d
lea r13, [r12 - 1]
test rdx, rdx
jne 0x140033a2b
lea rax, [rbp - 0x58]
mov qword [rbp - 0x60], rax
mov word [rbp - 0x58], r12w
mov r8d, r13d
mov rdx, qword [0x140148c30]
lea rcx, [rbp - 0x60]
call fcn.14000cdd0
nop
mov rdx, qword [0x140148cc0]
cmp word [rdx], r12w
jne 0x1400338a9
test rbx, rbx
je 0x140033805
mov rdx, rbx
lea rcx, [rbp - 0x60]
call fcn.14000ccf0
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140033853
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x60]
cmp rcx, rax
je 0x140033abd
call fcn.1400a9798
jmp 0x140033abd
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x140033838
mov dword [rsp + 0x50], r12d
mov ecx, esi
call fcn.1400a2da4
mov r14, rax
mov qword [rsp + 0x20], r12
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 0x140033a10
mov rcx, r14
call fcn.1400a2510
jmp 0x140033838
lea rcx, [rbp - 0x60]
call fcn.14000ccf0
lea rax, [rbp + 0xc8]
mov qword [rbp + 0xc0], rax
mov word [rbp + 0xc8], r12w
mov r8d, r13d
mov rdx, qword [0x140148d50]
lea rcx, [rbp + 0xc0]
call fcn.14000cdd0
nop
mov rdi, qword [0x140151640]
test rdi, rdi
jne 0x14003390c
lea rax, [rbp + 0xc8]
mov rcx, qword [rbp + 0xc0]
cmp rcx, rax
je 0x140033838
call fcn.1400a9798
jmp 0x140033838
mov dword [rsp + 0x50], r12d
lea rax, [rbp + 0x38]
mov qword [rbp + 0x30], rax
mov word [rbp + 0x38], r12w
mov r8d, r13d
mov rdx, rbx
lea rcx, [rbp + 0x30]
call fcn.14000cdd0
nop
lea r8, [0x140113a2c]
lea rdx, [0x140113a30]
lea rcx, [rbp + 0x30]
call fcn.14000cf10
lea rax, [rbp + 0x150]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov rdx, qword [rbp + 0x30]
mov rcx, rdi
call fcn.140041e90
test eax, eax
je 0x140033981
lea rax, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
cmp rcx, rax
je 0x1400338eb
call fcn.1400a9798
jmp 0x1400338eb
mov esi, dword [rbp + 0x37c]
test esi, esi
je 0x140033966
mov ecx, esi
call fcn.1400a2da4
mov r14, rax
cmp dword [rdi], 1
je 0x1400339ae
mov dword [0x14015166c], 0x80000
mov rcx, rax
call fcn.1400a2510
jmp 0x140033966
mov dword [rsp + 0x20], 3
mov r9d, esi
mov r8, r14
mov edx, dword [rsp + 0x50]
mov rcx, qword [rdi + 8]
call fcn.140041890
mov dword [0x14015166c], eax
test eax, eax
je 0x1400339e4
cmp eax, 0x600
je 0x1400339e4
mov rcx, r14
call fcn.1400a2510
jmp 0x140033966
lea rax, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
cmp rcx, rax
je 0x1400339f7
call fcn.1400a9798
nop
lea rax, [rbp + 0xc8]
mov rcx, qword [rbp + 0xc0]
cmp rcx, rax
je 0x140033a10
call fcn.1400a9798
nop
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x60]
cmp rcx, rax
je 0x140033ab4
call fcn.1400a9798
jmp 0x140033ab4
test r9, r9
jne 0x140033a42
mov rdi, qword [0x140151648]
test rdi, rdi
cmove rdi, qword [0x140151638]
mov r8, rdx
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x140033abd
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r15, rax
test rax, rax
jne 0x140033a78
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x140033abd
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x140033abd
mov ecx, esi
call fcn.1400a2da4
mov r14, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8d, esi
mov rcx, r14
call fcn.1400a4bc0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
test r14, r14
jne 0x140033b6c
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140033b40
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x140033b40
mov dword [rsp + 0x58], r12d
mov ecx, esi
call fcn.1400a2da4
mov r14, rax
mov qword [rsp + 0x20], r12
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 0x140033b6c
mov rcx, r14
call fcn.1400a2510
xor eax, eax
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400a24f0
mov rbx, qword [rsp + 0x4d0]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov qword [rbp + 0x160], r12
mov dword [rbp + 0x180], r12d
mov qword [rbp + 0x218], r14
mov qword [rbp + 0x208], r14
movsxd rdx, esi
add rdx, r14
mov qword [rbp + 0x220], rdx
mov qword [rbp + 0x210], rdx
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x4c]
lea rdx, [rsp + 0x48]
lea rcx, [rbp + 0x150]
call fcn.140023640
mov r15, rax
mov rcx, r14
call fcn.1400a2510
test r15, r15
je 0x140033b40
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x78], xmm0
mov dword [rbp - 0x68], r12d
mov dword [rsp + 0x70], 0x28
mov edx, dword [rsp + 0x48]
mov dword [rsp + 0x74], edx
mov eax, dword [rsp + 0x4c]
neg eax
mov dword [rsp + 0x78], eax
mov qword [rsp + 0x7c], 0x200001
imul edx, dword [rsp + 0x4c]
shl edx, 2
mov dword [rbp - 0x7c], edx
xor r14b, r14b
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
xor r8d, r8d
lea rdx, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140033b40
mov r10d, r12d
mov ecx, dword [rsp + 0x48]
imul ecx, dword [rsp + 0x4c]
test ecx, ecx
jle 0x140033d6c
lea r8, [r15 + 3]
mov r12, 0xfffffffffffffffe
sub r12, r15
sub r13, r15
mov qword [rsp + 0x58], r13
mov r13, 0xfffffffffffffffd
sub r13, r15
nop
mov r9, r8
sub r9, r15
movzx ecx, byte [r8]
mov rax, qword [rsp + 0x40]
mov byte [r9 + rax], cl
lea r11, [r8 + r13]
lea rbx, [r8 + r12]
mov rdi, qword [rsp + 0x58]
add rdi, r8
mov rsi, qword [rsp + 0x40]
cmp byte [r9 + rsi], 0xff
jae 0x140033cfa
movzx ecx, byte [r8 - 1]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov byte [r11 + rsi], 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 [rbx + 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 [rdi + rax], dl
mov r14b, 1
jmp 0x140033d1d
movzx eax, byte [r8 - 1]
mov byte [r11 + rsi], al
movzx ecx, byte [r8 - 2]
mov rax, qword [rsp + 0x40]
mov byte [rbx + rax], cl
movzx ecx, byte [r8 - 3]
mov rax, qword [rsp + 0x40]
mov byte [rdi + rax], cl
mov rax, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x60]
cmp dword [r11 + rax], ecx
jne 0x140033d50
mov byte [r11 + rax], 0
mov rax, qword [rsp + 0x40]
mov byte [rbx + rax], 0
mov rax, qword [rsp + 0x40]
mov byte [rdi + rax], 0
mov rax, qword [rsp + 0x40]
mov byte [r9 + rax], 0
mov r14b, 1
inc r10d
add r8, 4
mov eax, dword [rsp + 0x48]
imul eax, dword [rsp + 0x4c]
cmp r10d, eax
jl 0x140033c70
xor r12d, r12d
mov rcx, r15
call fcn.1400a9798
mov ecx, 0xb8
call fcn.1400a2614
mov qword [rsp + 0x60], rax
lea rcx, [rax + 0x30]
mov qword [rax + 0x28], rcx
mov word [rcx], r12w
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
mov rcx, qword [rsp + 0x50]
mov qword [rax], rcx
mov ecx, dword [rsp + 0x48]
mov dword [rax + 0x18], ecx
mov ecx, dword [rsp + 0x4c]
mov dword [rax + 0x1c], ecx
mov byte [rax + 0x20], r14b
jmp 0x140033b42