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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x680]
sub rsp, 0x780
mov rax, qword [0x14036a3c8]
xor rax, rsp
mov qword [rbp + 0x670], rax
mov edi, r9d
mov dword [rsp + 0x68], r9d
mov dword [rsp + 0x78], r8d
mov r14, rdx
mov qword [rbp - 0x80], rdx
mov r13, rcx
mov qword [rsp + 0x70], rcx
xor esi, esi
xor r15b, r15b
mov byte [rsp + 0x40], r15b
xor bl, bl
mov byte [rsp + 0x41], bl
mov dword [rsp + 0x60], 0x64
lea r12d, [rsi + 1]
lea r9, [0x14028f380]
test rdx, rdx
je 0x140088143
cmp word [rdx], si
je 0x140088143
xor ecx, ecx
nop dword [rax + rax]
movzx eax, word [rdx + rcx*2]
inc rcx
cmp ax, word [r9 + rcx*2 - 2]
jne 0x1400880ac
cmp rcx, 8
jne 0x140088080
mov rdi, r12
mov r8d, r12d
mov dword [rsp + 0x44], r12d
mov edx, r12d
mov dword [rsp + 0x48], edx
jmp 0x1400887fb
call fcn.14006d890
mov rcx, rax
mov r8, r14
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x140088436
call fcn.14006d890
mov rcx, rax
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r13, rax
test rax, rax
jne 0x1400880f8
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r13, qword [rsp + 0x70]
jmp 0x140088436
call fcn.14006d890
mov rcx, rax
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x1400880ee
mov ecx, esi
call fcn.140241020
mov rdi, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8d, esi
mov rcx, rdi
call fcn.1402430d0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r13, qword [rsp + 0x70]
jmp 0x1400886e0
call fcn.14006d8b0
mov rdx, rax
lea rcx, [rbp + 0x50]
call fcn.1400684a0
nop
call fcn.14006d8c0
mov rcx, rax
call fcn.1400694e0
test al, al
je 0x1400884ed
lea rcx, [rbp + 0xe0]
call fcn.140068500
nop
lea rcx, [rbp + 0x170]
call fcn.140068500
nop
call fcn.14006d930
mov rdx, rax
lea rcx, [rbp + 0x290]
call fcn.1400684a0
nop
lea rcx, [rbp + 0x290]
call fcn.1400694e0
test al, al
jne 0x140088244
mov r8, r13
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x290]
call fcn.140068800
nop
mov rdx, rax
lea rcx, [rbp + 0xe0]
call fcn.1400686b0
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
lea rdx, [rbp + 0xe0]
lea rcx, [rbp - 0x40]
call fcn.140087ba0
nop
mov rdx, rax
lea rcx, [rbp + 0x170]
call fcn.1400686b0
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
lea rcx, [rbp + 0xe0]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne r15b
mov byte [rsp + 0x40], r15b
lea rcx, [rbp + 0x170]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne bl
mov byte [rsp + 0x41], bl
lea rcx, [rbp + 0x290]
call fcn.1400694e0
test al, al
jne 0x140088265
test r15b, r15b
jne 0x1400882f9
test bl, bl
jne 0x1400882fd
mov r8, r13
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x50]
call fcn.140068800
nop
mov rdx, rax
lea rcx, [rbp + 0xe0]
call fcn.1400686b0
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
lea rdx, [rbp + 0xe0]
lea rcx, [rbp - 0x40]
call fcn.140087ba0
nop
mov rdx, rax
lea rcx, [rbp + 0x170]
call fcn.1400686b0
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
lea rcx, [rbp + 0xe0]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne r15b
mov byte [rsp + 0x40], r15b
lea rcx, [rbp + 0x170]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne bl
mov byte [rsp + 0x41], bl
test bl, bl
je 0x14008831b
cmp edi, 0x96
jae 0x14008830a
test r15b, r15b
jne 0x14008831b
mov dword [rsp + 0x60], 0xc8
lea rcx, [rbp + 0x170]
jmp 0x140088322
lea rcx, [rbp + 0xe0]
call fcn.1400687f0
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], Ordinal_133
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r12d
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140088391
lea rcx, [rbp + 0x290]
call fcn.140003e80
nop
lea rcx, [rbp + 0x170]
call fcn.140003e80
nop
lea rcx, [rbp + 0xe0]
call fcn.140003e80
nop
lea rcx, [rbp + 0x50]
call fcn.140003e80
jmp 0x140088436
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
jne 0x1400883ad
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14008835c
mov dword [rsp + 0x70], r15d
mov rcx, rsi
lea rdx, [0x1403243e8]
call fcn.140241530
mov rdi, rax
mov rcx, rbx
test rax, rax
je 0x1400884c0
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x70]
mov r8d, esi
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x70], esi
je 0x1400884c7
mov rcx, rdi
call fcn.140240d18
nop
lea rcx, [rbp + 0x290]
call fcn.140003e80
nop
lea rcx, [rbp + 0x170]
call fcn.140003e80
nop
lea rcx, [rbp + 0xe0]
call fcn.140003e80
nop
lea rcx, [rbp + 0x50]
call fcn.140003e80
mov edi, dword [rsp + 0x68]
mov r8d, 0xffffffff
mov rdx, r13
lea rcx, [rbp + 0x3b0]
call fcn.1400684d0
nop
lea rdx, [rbp + 0x3b0]
lea rcx, [rbp - 0x40]
call fcn.140087ba0
nop
lea rcx, [rbp + 0x3b0]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne r15b
mov byte [rsp + 0x40], r15b
lea rcx, [rbp - 0x40]
call fcn.1400687f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne byte [rsp + 0x41]
je 0x1400886ee
cmp edi, 0x96
jae 0x1400884af
test r15b, r15b
jne 0x1400886ee
mov dword [rsp + 0x60], 0xc8
lea rcx, [rbp - 0x40]
jmp 0x1400886f5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp + 0x290]
call fcn.140003e80
nop
lea rcx, [rbp + 0x170]
call fcn.140003e80
nop
lea rcx, [rbp + 0xe0]
jmp 0x1400886d1
call fcn.14006d8c0
mov rdx, rax
lea rcx, [rbp + 0x50]
call fcn.140068a60
call fcn.14006dd30
test al, al
je 0x14008850e
call fcn.14006d8d0
jmp 0x140088525
lea rcx, [rbp + 0x50]
call fcn.1400687f0
mov rcx, rax
xor edx, edx
lea r8d, [rdx + 2]
call fcn.14008e580
mov rbx, rax
test rax, rax
je 0x140088383
mov r8d, 0xffffffff
mov rdx, r13
lea rcx, [rbp + 0x200]
call fcn.1400684d0
nop
lea rdx, [rbp + 0x200]
lea rcx, [rbp + 0x320]
call fcn.140087ba0
nop
lea rcx, [rbp + 0x200]
call fcn.1400687f0
mov rdx, rax
lea rax, [rbp + 0x440]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
mov r8b, 1
mov rcx, rbx
call fcn.14008ded0
test eax, eax
sete r15b
mov byte [rsp + 0x40], r15b
lea rcx, [rbp + 0x320]
call fcn.1400687f0
mov rdx, rax
lea rax, [rbp + 0x440]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
mov r8b, 1
mov rcx, rbx
call fcn.14008ded0
test eax, eax
sete byte [rsp + 0x41]
test eax, eax
jne 0x140088636
cmp edi, 0x96
jae 0x1400885d4
test r15b, r15b
jne 0x140088636
mov dword [rsp + 0x60], 0xc8
lea rcx, [rbp + 0x320]
call fcn.1400687f0
mov rdx, rax
lea rax, [rbp + 0x440]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
mov r8b, 1
mov rcx, rbx
call fcn.14008ded0
test eax, eax
je 0x14008863f
call fcn.14006dd30
test al, al
jne 0x14008861d
mov rcx, rbx
call fcn.14008dcc0
nop
lea rcx, [rbp + 0x320]
call fcn.140003e80
nop
lea rcx, [rbp + 0x200]
jmp 0x14008837d
lea rcx, [rbp + 0x200]
jmp 0x1400885e3
mov esi, dword [rbp + 0x66c]
test esi, esi
je 0x14008860b
mov ecx, esi
call fcn.140241020
mov rdi, rax
mov dword [rsp + 0x20], 3
mov r9d, esi
mov r8, rax
mov edx, dword [rsp + 0x5c]
mov rcx, rbx
call fcn.14008ecb0
test eax, eax
je 0x1400886ab
cmp eax, 0x600
je 0x1400886ab
mov rcx, rdi
call fcn.140240d18
call fcn.14006dd30
test al, al
jne 0x140088692
mov rcx, rbx
call fcn.14008dcc0
nop
lea rcx, [rbp + 0x320]
call fcn.140003e80
nop
lea rcx, [rbp + 0x200]
jmp 0x140088423
call fcn.14006dd30
test al, al
jne 0x1400886bd
mov rcx, rbx
call fcn.14008dcc0
nop
lea rcx, [rbp + 0x320]
call fcn.140003e80
nop
lea rcx, [rbp + 0x200]
call fcn.140003e80
nop
lea rcx, [rbp + 0x50]
call fcn.140003e80
test rdi, rdi
jne 0x1400887e0
jmp 0x140088432
lea rcx, [rbp + 0x3b0]
call fcn.1400687f0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], Ordinal_133
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r12d
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14008874b
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
jne 0x140088766
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
nop
lea rcx, [rbp + 0x3b0]
call fcn.140003e80
jmp 0x140088b78
xor r15d, r15d
mov dword [rsp + 0x68], r15d
mov rcx, rsi
lea rdx, [0x1403243e8]
call fcn.140241530
mov rdi, rax
mov rcx, rbx
test rax, rax
je 0x1400887ba
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x68], esi
je 0x1400887c1
mov rcx, rdi
call fcn.140240d18
mov edi, r15d
jmp 0x1400887c1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp - 0x40]
call fcn.140003e80
nop
lea rcx, [rbp + 0x3b0]
call fcn.140003e80
test rdi, rdi
je 0x140088b78
mov r8d, r12d
mov dword [rsp + 0x44], r12d
mov edx, r12d
mov dword [rsp + 0x48], edx
test r14, r14
je 0x140088818
lea r9, [0x14028f380]
xor r15d, r15d
xor ecx, ecx
movzx eax, word [r14 + rcx*2]
inc rcx
cmp ax, word [r9 + rcx*2 - 2]
jne 0x140088818
cmp rcx, 8
jne 0x140088800
jmp 0x14008886b
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x78]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x44]
mov edx, esi
mov rcx, rdi
call fcn.1400bfa80
mov r15, rax
mov rcx, rdi
call fcn.140240d18
test r15, r15
je 0x140088b78
mov r8d, dword [rsp + 0x44]
test r8d, r8d
jle 0x140088b70
mov edx, dword [rsp + 0x48]
test edx, edx
jle 0x140088b70
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
mov dword [rbp - 0x48], 0
mov dword [rbp - 0x70], Ordinal_46
mov dword [rbp - 0x6c], r8d
mov eax, edx
neg eax
mov dword [rbp - 0x68], eax
mov qword [rbp - 0x64], 0x200001
imul edx, r8d
shl edx, 2
mov dword [rbp - 0x5c], edx
xor dil, dil
mov byte [rsp + 0x42], dil
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
xor r8d, r8d
lea rdx, [rbp - 0x70]
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov rsi, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x140088b78
mov dword [rsp + 0x58], 0
test r14, r14
je 0x140088967
xor ecx, ecx
lea rdx, [0x14028f380]
nop
movzx eax, word [r14 + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x140088967
cmp rcx, 8
jne 0x140088900
mov qword [rsp + 0x70], 0
cmp word [r13], 0x23
jne 0x140088932
mov rcx, r13
call qword [sym.imp.USER32.dll_CharNextW]
mov r13, rax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x70]
mov rcx, r13
call fcn.14025924c
mov ecx, eax
shr ecx, 0x18
mov byte [rsp + 0x5b], cl
mov byte [rsp + 0x5a], al
mov ecx, eax
shr ecx, 8
mov byte [rsp + 0x59], cl
shr eax, 0x10
mov byte [rsp + 0x58], al
lea r15, [rsp + 0x58]
xor r10d, r10d
mov eax, dword [rsp + 0x48]
imul eax, dword [rsp + 0x44]
test eax, eax
jle 0x140088aab
lea r8, [r15 + 3]
mov rsi, 0xfffffffffffffffe
sub rsi, r15
mov r12, r15
not r12
mov r13, 0xfffffffffffffffd
sub r13, r15
mov r14d, dword [rsp + 0x78]
nop
mov r9, r8
sub r9, r15
movzx ecx, byte [r8]
mov rax, qword [rsp + 0x50]
mov byte [r9 + rax], cl
lea r11, [r8 + r13]
lea rbx, [rsi + r8]
lea rdi, [r12 + r8]
cmp cl, 0xff
jae 0x140088a26
movzx ecx, byte [r8]
movzx eax, byte [r8 - 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x50]
mov byte [r11 + rax], 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 + 0x50]
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 + 0x50]
mov byte [rdi + rax], dl
mov byte [rsp + 0x42], 1
jmp 0x140088a4e
movzx ecx, byte [r8 - 1]
mov rax, qword [rsp + 0x50]
mov byte [r11 + rax], cl
movzx ecx, byte [r8 - 2]
mov rax, qword [rsp + 0x50]
mov byte [rbx + rax], cl
movzx ecx, byte [r8 - 3]
mov rax, qword [rsp + 0x50]
mov byte [rdi + rax], cl
mov rax, qword [rsp + 0x50]
cmp dword [r11 + rax], r14d
jne 0x140088a84
mov byte [r11 + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [rbx + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [rdi + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [r9 + rax], 0
mov dil, 1
mov byte [rsp + 0x42], dil
jmp 0x140088a89
movzx edi, byte [rsp + 0x42]
inc r10d
add r8, 4
mov eax, dword [rsp + 0x48]
imul eax, dword [rsp + 0x44]
cmp r10d, eax
jl 0x1400889a0
mov r14, qword [rbp - 0x80]
mov rsi, qword [rsp + 0x68]
test r14, r14
je 0x140088ad7
xor ecx, ecx
lea rdx, [0x14028f380]
nop dword [rax]
movzx eax, word [r14 + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x140088ad7
cmp rcx, 8
jne 0x140088ac0
jmp 0x140088adf
mov rcx, r15
call fcn.1400bfa70
mov ecx, 0xb8
call fcn.1402407f4
mov rbx, rax
mov qword [rbp - 0x80], rax
test rax, rax
je 0x140088b03
lea rcx, [rax + 0x28]
call fcn.140068500
xor r15d, r15d
jmp 0x140088b09
xor r15d, r15d
mov ebx, r15d
mov qword [rbx], rsi
mov rax, qword [rsp + 0x50]
mov qword [rbx + 8], rax
mov r8d, dword [rsp + 0x60]
cmp r8d, 0xc8
jne 0x140088b3d
mov eax, dword [rsp + 0x44]
cdq
sub eax, edx
sar eax, 1
mov dword [rbx + 0x18], eax
mov eax, dword [rsp + 0x48]
cdq
sub eax, edx
sar eax, 1
mov dword [rbx + 0x1c], eax
jmp 0x140088b4b
mov ecx, dword [rsp + 0x44]
mov dword [rbx + 0x18], ecx
mov ecx, dword [rsp + 0x48]
mov dword [rbx + 0x1c], ecx
mov byte [rbx + 0x20], dil
mov byte [rbx + 0x21], 0
movzx eax, byte [rsp + 0x40]
mov byte [rbx + 0x22], al
movzx eax, byte [rsp + 0x41]
mov byte [rbx + 0x23], al
mov dword [rbx + 0x24], r8d
mov qword [rbx + 0x10], r15
mov rax, rbx
jmp 0x140088b7a
mov rcx, r15
call fcn.1400bfa70
xor eax, eax
mov rcx, qword [rbp + 0x670]
xor rcx, rsp
call fcn.140240e30
lea r11, [rsp + 0x780]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret