Function at 0x14003ae40
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 [0x140144038]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rdi, r9
mov dword [rsp + 0x60], r8d
mov rbx, rcx
xor r12d, r12d
lea r13, [r12 - 1]
test rdx, rdx
jne 0x14003b1c3
lea rcx, [rbp - 0x58]
mov qword [rbp - 0x60], rcx
mov word [rbp - 0x58], r12w
mov rax, qword [0x140144c80]
lea rsi, [0x140112cfc]
mov r14, rsi
test rax, rax
cmovne r14, rax
mov rdi, r13
inc rdi
cmp word [r14 + rdi*2], r12w
jne 0x14003aeb4
cmp edi, 0x3f
jl 0x14003aede
mov qword [rbp - 0x60], r12
lea eax, [rdi + 1]
movsxd rdx, eax
add rdx, rdx
xor ecx, ecx
call fcn.1400a9604
mov rcx, rax
mov qword [rbp - 0x60], rax
movsxd rdi, edi
mov r8, rdi
mov rdx, r14
call fcn.1400a960c
mov rax, qword [rbp - 0x60]
mov word [rax + rdi*2], r12w
mov rdx, qword [0x140144d10]
cmp word [rdx], 0
jne 0x14003afbc
test rbx, rbx
je 0x14003af17
mov rdx, rbx
lea rcx, [rbp - 0x60]
call fcn.14000c8f0
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, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14003af66
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x60]
cmp rcx, rax
je 0x14003b255
call fcn.1400a95f0
jmp 0x14003b255
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x14003af4b
mov dword [rsp + 0x50], r12d
mov ecx, esi
call fcn.1400a2ca4
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 0x14003b1a8
mov rcx, r14
call fcn.1400a2410
jmp 0x14003af4b
lea rcx, [rbp - 0x60]
call fcn.14000c8f0
lea rcx, [rbp + 0xc8]
mov qword [rbp + 0xc0], rcx
mov word [rbp + 0xc8], r12w
mov rax, qword [0x140144da0]
mov r14, rsi
test rax, rax
cmovne r14, rax
mov rdi, r13
nop
inc rdi
cmp word [r14 + rdi*2], 0
jne 0x14003aff0
cmp edi, 0x3f
jl 0x14003b021
mov qword [rbp + 0xc0], r12
lea eax, [rdi + 1]
movsxd rdx, eax
add rdx, rdx
xor ecx, ecx
call fcn.1400a9604
mov rcx, rax
mov qword [rbp + 0xc0], rax
movsxd rdi, edi
mov r8, rdi
mov rdx, r14
call fcn.1400a960c
mov rax, qword [rbp + 0xc0]
mov word [rax + rdi*2], r12w
mov r15, qword [0x14014a530]
test r15, r15
jne 0x14003b068
lea rax, [rbp + 0xc8]
mov rcx, qword [rbp + 0xc0]
cmp rcx, rax
je 0x14003af4b
call fcn.1400a95f0
jmp 0x14003af4b
mov dword [rsp + 0x50], r12d
lea rax, [rbp + 0x38]
mov qword [rbp + 0x30], rax
mov word [rbp + 0x38], r12w
test rbx, rbx
cmovne rsi, rbx
mov rdi, r13
inc rdi
cmp word [rsi + rdi*2], 0
jne 0x14003b084
cmp edi, 0x3f
jl 0x14003b0ab
mov qword [rbp + 0x30], r12
lea eax, [rdi + 1]
movsxd rdx, eax
add rdx, rdx
xor ecx, ecx
call fcn.1400a9604
mov qword [rbp + 0x30], rax
movsxd rdi, edi
mov r8, rdi
mov rdx, rsi
mov rcx, rax
call fcn.1400a960c
mov rax, qword [rbp + 0x30]
mov word [rax + rdi*2], r12w
lea r8, [0x140113134]
lea rdx, [0x140113138]
lea rcx, [rbp + 0x30]
call fcn.14000cc90
lea rax, [rbp + 0x150]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov rdx, qword [rbp + 0x30]
mov rcx, r15
call fcn.1400281a0
test eax, eax
je 0x14003b118
lea rax, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
cmp rcx, rax
je 0x14003b047
call fcn.1400a95f0
jmp 0x14003b047
mov esi, dword [rbp + 0x37c]
test esi, esi
je 0x14003b0fd
mov ecx, esi
call fcn.1400a2ca4
mov r14, rax
cmp dword [r15], 1
je 0x14003b146
mov dword [0x14014a550], 0x80000
mov rcx, rax
call fcn.1400a2410
jmp 0x14003b0fd
mov dword [rsp + 0x20], 3
mov r9d, esi
mov r8, r14
mov edx, dword [rsp + 0x50]
mov rcx, qword [r15 + 8]
call fcn.140027ba0
mov dword [0x14014a550], eax
test eax, eax
je 0x14003b17c
cmp eax, 0x600
je 0x14003b17c
mov rcx, r14
call fcn.1400a2410
jmp 0x14003b0fd
lea rax, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
cmp rcx, rax
je 0x14003b18f
call fcn.1400a95f0
nop
lea rax, [rbp + 0xc8]
mov rcx, qword [rbp + 0xc0]
cmp rcx, rax
je 0x14003b1a8
call fcn.1400a95f0
nop
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x60]
cmp rcx, rax
je 0x14003b24c
call fcn.1400a95f0
jmp 0x14003b24c
test r9, r9
jne 0x14003b1da
mov rdi, qword [0x14014a538]
test rdi, rdi
cmove rdi, qword [0x14014a528]
mov r8, rdx
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x14003b255
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r15, rax
test rax, rax
jne 0x14003b210
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x14003b255
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x14003b255
mov ecx, esi
call fcn.1400a2ca4
mov r14, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8d, esi
mov rcx, r14
call fcn.1400a4a90
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
test r14, r14
jne 0x14003b304
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 0x14003b2d8
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x14003b2d8
mov dword [rsp + 0x58], r12d
mov ecx, esi
call fcn.1400a2ca4
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 0x14003b304
mov rcx, r14
call fcn.1400a2410
xor eax, eax
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400a23f0
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.140028bc0
mov r15, rax
mov rcx, r14
call fcn.1400a2410
test r15, r15
je 0x14003b2d8
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 0x14003b2d8
mov r10d, r12d
mov ecx, dword [rsp + 0x48]
imul ecx, dword [rsp + 0x4c]
test ecx, ecx
jle 0x14003b50c
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 word [rax + rax]
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, [r12 + r8]
mov rdi, qword [rsp + 0x58]
add rdi, r8
mov rsi, qword [rsp + 0x40]
cmp byte [r9 + rsi], 0xff
jae 0x14003b49a
movzx ecx, byte [r8]
movzx eax, byte [r8 - 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov byte [r11 + rsi], dl
movzx ecx, byte [r8]
movzx eax, byte [r8 - 2]
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]
movzx eax, byte [r8 - 3]
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 0x14003b4bd
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 0x14003b4f0
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 0x14003b410
xor r12d, r12d
mov rcx, r15
call fcn.1400a95f0
mov ecx, 0xb8
call fcn.1400a2514
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 0x14003b2da