Function at 0x1400a7f20
Capabilities:
Check if file exists
Get file attributes
Get file size
Link many functions at runtime
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xd0
mov rbx, qword [rbp + 0x7f]
xor esi, esi
mov qword [rbp - 0x79], rsi
mov r15, r9
mov dword [r9], 0xffffffff
mov r14d, r8d
mov r12d, edx
mov rdi, rcx
test rbx, rbx
je 0x1400a7f5c
mov byte [rbx], sil
cmp word [rcx], si
jne 0x1400a7f68
xor eax, eax
jmp 0x1400a86a5
mov r8d, 6
mov qword [rsp + 0x118], r13
lea rdx, str.hicon:
mov byte [rbp - 0x80], sil
mov byte [rbp + 0x67], sil
call fcn.1400cab68
mov r13d, dword [rbp + 0x6f]
mov ecx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
test eax, eax
je 0x1400a7fba
test r13d, r13d
jne 0x1400a8024
lea r8d, [rcx - 4]
mov rcx, rdi
lea rdx, str.hbitmap:
call fcn.1400cab68
test eax, eax
jne 0x1400a8024
lea ecx, [rax + 0xc]
cmp word [rdi + 0xa], 0x3a
jne 0x1400a7fcd
mov dword [r15], 1
mov rax, rcx
jmp 0x1400a7fd5
mov dword [r15], esi
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
add rdi, rax
mov byte [rbp - 0x80], 1
cmp word [rdi], 0x2a
sete byte [rbp + 0x67]
cmp word [rdi], 0x2a
jne 0x1400a7ff6
add rdi, 2
test rbx, rbx
je 0x1400a7ff6
mov byte [rbx], 1
mov rcx, rdi
call fcn.14000f010
mov rcx, rdi
test al, al
je 0x1400a8012
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.1400cc568
jmp 0x1400a8017
call fcn.1400cc174
mov qword [rbp - 0x79], rax
test rax, rax
je 0x1400a8638
mov edx, 0x2e
mov rcx, rdi
call fcn.1400c6d90
mov rbx, rax
test rax, rax
je 0x1400a803d
add rbx, 2
mov rcx, qword [rbp - 0x79]
test rcx, rcx
jne 0x1400a80b4
cmp r13d, 1
ja 0x1400a80ca
test rbx, rbx
je 0x1400a80b4
lea rdx, [0x140115ca8]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a80ca
lea rdx, [0x140115cb0]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a80ca
lea rdx, [0x140119f78]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a80ca
lea rdx, [0x140119f80]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a80ca
lea rdx, [0x140119f88]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a80ca
mov rcx, qword [rbp - 0x79]
mov byte [rsp + 0x40], sil
test r13d, r13d
jle 0x1400a80fb
mov dword [r15], 1
jmp 0x1400a8169
mov r9d, r14d
mov byte [rsp + 0x40], 1
mov r8d, r12d
mov dword [r15], 1
mov edx, r13d
mov rcx, rdi
call fcn.1400a86e0
mov qword [rbp - 0x79], rax
mov rcx, rax
cmp rax, 2
jae 0x1400a8169
xor eax, eax
jmp 0x1400a869d
test rbx, rbx
je 0x1400a8169
lea rdx, [0x140115ca0]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
jne 0x1400a811c
mov dword [r15], 1
jmp 0x1400a8165
lea rdx, [0x140119f90]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a815e
lea rdx, [0x140119f98]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a815e
lea rdx, [0x140119fa0]
mov rcx, rbx
call fcn.1400c8580
mov rcx, qword [rbp - 0x79]
test eax, eax
jne 0x1400a8169
mov dword [r15], esi
jmp 0x1400a8169
mov dword [r15], 2
mov rcx, qword [rbp - 0x79]
cmp r12d, 0xffffffff
je 0x1400a8175
cmp r14d, 0xffffffff
jne 0x1400a817f
test r12d, r12d
je 0x1400a8191
test r14d, r14d
je 0x1400a8191
cmp r12d, 0xffffffff
je 0x1400a818b
cmp r14d, 0xffffffff
jne 0x1400a8197
mov byte [rbp + 0x4f], 1
jmp 0x1400a819b
mov r14d, esi
mov r12d, esi
mov byte [rbp + 0x4f], sil
movzx eax, byte [rbp + 0x77]
mov r13, rsi
mov dword [rbp - 0x71], eax
test al, al
je 0x1400a81cc
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rbp - 0x79]
mov r13, rax
mov eax, dword [rbp - 0x71]
test r13, r13
movzx eax, al
cmove eax, esi
mov dword [rbp - 0x71], eax
test rcx, rcx
jne 0x1400a826e
mov r8d, dword [r15]
cmp r8d, 0xffffffff
jle 0x1400a826e
test al, al
jne 0x1400a826e
cmp byte [rbp + 0x4f], sil
je 0x1400a81f7
mov r9d, esi
mov eax, esi
jmp 0x1400a81fd
mov r9d, r12d
mov eax, r14d
mov dword [rsp + 0x28], 0x2010
mov rdx, rdi
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rbp - 0x79], rax
mov rcx, rax
test rax, rax
je 0x1400a822b
cmp byte [rbp + 0x4f], sil
jne 0x1400a826e
jmp 0x1400a869d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400a8638
mov edx, dword [rbp + 0x6f]
test edx, edx
jle 0x1400a826a
mov r9d, r14d
mov r8d, r12d
mov rcx, rdi
call fcn.1400a86e0
mov qword [rbp - 0x79], rax
mov rcx, rax
cmp rax, 2
jb 0x1400a8638
mov byte [rsp + 0x40], 1
jmp 0x1400a826e
mov rcx, qword [rbp - 0x79]
mov qword [rbp - 0x69], rsi
test rcx, rcx
jne 0x1400a84f5
mov dword [r15], esi
cmp byte [rbp - 0x71], sil
jne 0x1400a82c2
test rbx, rbx
je 0x1400a82c2
lea rdx, [0x140119fb8]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a82db
lea rdx, str.jpeg
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a82db
lea rdx, [0x140119fd0]
mov rcx, rbx
call fcn.1400c8580
test eax, eax
je 0x1400a82db
test r13, r13
jne 0x1400a8425
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r13, rax
test r13, r13
jne 0x1400a8425
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], esi
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1400a8638
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov ecx, 2
mov dword [rbp - 0x71], eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbx, rax
test rax, rax
jne 0x1400a8349
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400a869d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r13
test rax, rax
jne 0x1400a8370
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1400a869d
mov r8d, dword [rbp - 0x71]
lea r9, [rbp - 0x71]
mov rdx, rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rbp - 0x61]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x1400a8360
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x1400a8360
lea rax, [rbp - 0x69]
xor r8d, r8d
lea r9, [0x1400e61b0]
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov rcx, qword [rbp - 0x69]
test eax, eax
cmovs rcx, rsi
mov qword [rbp - 0x69], rcx
mov rcx, qword [rbp - 0x61]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400a8638
mov rax, qword [rcx]
lea rdx, [rbp - 0x79]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov rcx, qword [rbp - 0x79]
test rcx, rcx
jne 0x1400a84f5
mov rcx, qword [rbp - 0x69]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
xor eax, eax
jmp 0x1400a869d
lea rdx, str.GdiplusStartup
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, r13
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromFile
mov rcx, r13
mov qword [rbp - 0x21], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateHBITMAPFromBitmap
mov rcx, r13
mov qword [rbp - 0x71], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDisposeImage
mov rcx, r13
mov qword [rbp - 0x39], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp - 0x59], 1
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x51], rsi
mov qword [rbp - 0x49], rsi
test rbx, rbx
je 0x1400a84e8
xor r8d, r8d
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x29]
call rbx
test eax, eax
jne 0x1400a84e8
lea rdx, [rbp - 0x61]
mov rcx, rdi
call qword [rbp - 0x71]
test eax, eax
jne 0x1400a84e1
mov rcx, qword [rbp - 0x61]
lea rdx, [rbp - 0x79]
mov r8d, 0xff000000
call qword [rbp - 0x39]
mov rcx, qword [rbp - 0x79]
test eax, eax
cmovne rcx, rsi
mov qword [rbp - 0x79], rcx
mov rcx, qword [rbp - 0x61]
call qword [rbp - 0x31]
mov rcx, qword [rbp - 0x29]
call qword [rbp - 0x21]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, qword [rbp - 0x79]
cmp byte [rbp + 0x4f], sil
je 0x1400a85f4
cmp dword [r15], esi
je 0x1400a851a
lea rdx, [rbp - 0x19]
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400a862e
mov rcx, qword [rbp - 9]
lea r8, [rbp - 0x59]
mov edx, SafeArrayAllocDescriptor
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r14d, 0xffffffff
jne 0x1400a8567
mov eax, dword [rbp - 0x55]
test eax, eax
je 0x1400a859d
movd xmm2, dword [rbp - 0x51]
cvtdq2pd xmm2, xmm2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movd xmm1, r12d
divsd xmm2, xmm0
cvtdq2pd xmm1, xmm1
mulsd xmm2, xmm1
addsd xmm2, qword [0x14011bb18]
cvttsd2si r14d, xmm2
jmp 0x1400a859d
mov eax, dword [rbp - 0x51]
test eax, eax
je 0x1400a859d
movd xmm2, dword [rbp - 0x55]
cvtdq2pd xmm2, xmm2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movd xmm1, r14d
divsd xmm2, xmm0
cvtdq2pd xmm1, xmm1
mulsd xmm2, xmm1
addsd xmm2, qword [0x14011bb18]
cvttsd2si r12d, xmm2
cmp dword [r15], esi
je 0x1400a85f0
mov rcx, qword [rbp - 1]
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, qword [rbp - 9]
call qword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [rsp + 0x40], sil
jne 0x1400a85f0
cmp byte [rbp - 0x80], sil
jne 0x1400a85f0
mov rcx, qword [rbp - 0x79]
call qword [sym.imp.USER32.dll_DestroyIcon]
mov r8d, dword [r15]
mov r9d, r12d
mov rdx, rdi
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayGetDim
xor ecx, ecx
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400a869d
mov rcx, qword [rbp - 0x79]
cmp qword [rbp - 0x69], rsi
je 0x1400a863c
test r12d, r12d
jne 0x1400a8609
test r14d, r14d
jne 0x1400a8609
mov esi, 4
mov r9d, r14d
mov dword [rsp + 0x20], esi
mov r8d, r12d
xor edx, edx
call qword [sym.imp.USER32.dll_CopyImage]
mov rcx, qword [rbp - 0x69]
mov rbx, rax
mov rdx, qword [rcx]
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov rdi, qword [rbp + 0x7f]
jmp 0x1400a868c
mov rcx, qword [rbp - 0x79]
call qword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
jmp 0x1400a869d
movzx eax, byte [rbp + 0x67]
test r12d, r12d
jne 0x1400a865c
test r14d, r14d
jne 0x1400a865c
test al, al
je 0x1400a8657
mov rdi, qword [rbp + 0x7f]
test rdi, rdi
je 0x1400a8660
mov rax, rcx
jmp 0x1400a869d
mov rdi, qword [rbp + 0x7f]
test al, al
je 0x1400a8671
mov rax, rdi
neg rax
sbb eax, eax
and eax, 4
jmp 0x1400a8676
mov eax, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov edx, dword [r15]
mov r9d, r14d
mov r8d, r12d
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CopyImage]
mov rbx, rax
cmp qword [rbp - 0x79], rbx
je 0x1400a869a
test rdi, rdi
je 0x1400a869a
mov byte [rdi], 0
mov rax, rbx
mov r13, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret