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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xd0
mov r12, qword [rbp + 0x77]
xor esi, esi
mov qword [rsp + 0x48], rsi
mov r14, r9
mov dword [r9], 0xffffffff
mov r15d, r8d
mov r13d, edx
mov rbx, rcx
mov rdi, rcx
test r12, r12
je 0x1400ae6d6
mov byte [r12], sil
cmp word [rcx], si
je 0x1400ae851
mov r8d, 6
mov byte [rsp + 0x41], sil
lea rdx, str.hicon:
mov byte [rbp + 0x47], sil
call fcn.1400d2a10
test eax, eax
je 0x1400ae717
mov r8d, 8
lea rdx, str.hbitmap:
mov rcx, rbx
call fcn.1400d2a10
test eax, eax
jne 0x1400ae787
movzx ecx, word [rbx + 0xa]
mov eax, reloc.WSOCK32.dll_recv
cmp cx, 0x3a
mov byte [rsp + 0x41], 1
mov ebx, reloc.WSOCK32.dll_ioctlsocket
cmovne ebx, eax
mov eax, esi
add rbx, rdi
cmp cx, 0x3a
sete al
mov dword [r14], eax
cmp word [rbx], 0x2a
sete byte [rbp + 0x47]
jne 0x1400ae758
add rbx, 2
test r12, r12
je 0x1400ae758
mov byte [r12], 1
mov rcx, rbx
call fcn.140005a80
mov rcx, rbx
test al, al
je 0x1400ae774
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.1400d22a0
jmp 0x1400ae779
call fcn.1400d283c
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400ae851
mov edx, 0x2e
mov rcx, rbx
call fcn.1400cba50
test rax, rax
lea rdi, [rax + 2]
cmove rdi, rax
cmp qword [rsp + 0x48], rsi
jne 0x1400ae86e
mov r12d, dword [rbp + 0x67]
cmp r12d, 1
ja 0x1400ae81c
test rdi, rdi
je 0x1400ae86e
lea rdx, [0x140118c30]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae81c
lea rdx, [0x140118c38]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae81c
lea rdx, [0x14011c110]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae81c
lea rdx, [0x14011c118]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae81c
lea rdx, [0x14011c120]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
jne 0x1400ae86e
mov rax, qword [rbp + 0x7f]
mov r9d, r15d
mov r8d, r13d
mov qword [rsp + 0x20], rax
mov edx, r12d
mov byte [rsp + 0x40], 1
mov rcx, rbx
mov dword [r14], 1
call fcn.1400aeea0
mov qword [rsp + 0x48], rax
cmp rax, 2
jae 0x1400ae8d9
xor eax, eax
mov rbx, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov byte [rsp + 0x40], sil
test rdi, rdi
je 0x1400ae8d9
lea rdx, [0x140118c28]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
jne 0x1400ae894
mov dword [r14], 1
jmp 0x1400ae8d9
lea rdx, [0x14011c128]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae8d2
lea rdx, [0x14011c130]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400ae8d2
lea rdx, [0x14011c138]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
jne 0x1400ae8d9
mov dword [r14], esi
jmp 0x1400ae8d9
mov dword [r14], 2
cmp r13d, 0xffffffff
je 0x1400ae8ea
cmp r15d, 0xffffffff
jne 0x1400ae907
test r13d, r13d
je 0x1400ae8ef
test r15d, r15d
jne 0x1400ae8fb
mov r15d, esi
mov byte [rbp + 0x5f], sil
mov r13d, esi
jmp 0x1400ae911
cmp r13d, 0xffffffff
je 0x1400ae90d
cmp r15d, 0xffffffff
je 0x1400ae90d
mov byte [rbp + 0x5f], sil
jmp 0x1400ae911
mov byte [rbp + 0x5f], 1
movzx r12d, byte [rbp + 0x6f]
mov qword [rbp - 0x79], rsi
test r12b, r12b
je 0x1400ae937
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
mov qword [rbp - 0x79], rax
cmove r12d, esi
cmp qword [rsp + 0x48], rsi
jne 0x1400ae9e9
mov r8d, dword [r14]
cmp r8d, 0xffffffff
jle 0x1400ae9e9
test r12b, r12b
jne 0x1400ae9e9
cmp byte [rbp + 0x5f], sil
je 0x1400ae965
mov r9d, esi
mov eax, esi
jmp 0x1400ae96b
mov r9d, r13d
mov eax, r15d
mov dword [rsp + 0x28], 0x2010
mov rdx, rbx
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400ae99c
cmp byte [rbp + 0x5f], sil
jne 0x1400ae9e9
cmp dword [rbp + 0x67], esi
jne 0x1400ae9e9
jmp 0x1400ae853
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400ae851
mov eax, dword [rbp + 0x67]
test eax, eax
jle 0x1400ae9e9
mov rcx, qword [rbp + 0x7f]
mov r9d, r15d
mov qword [rsp + 0x20], rcx
mov r8d, r13d
mov rcx, rbx
mov edx, eax
call fcn.1400aeea0
mov qword [rsp + 0x48], rax
cmp rax, 2
jb 0x1400ae851
mov byte [rsp + 0x40], 1
mov dword [r14], 1
mov qword [rbp - 0x71], rsi
cmp qword [rsp + 0x48], rsi
jne 0x1400aec66
mov dword [r14], esi
test r12b, r12b
jne 0x1400aea3e
test rdi, rdi
je 0x1400aea3e
lea rdx, [0x14011c150]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400aea5d
lea rdx, str.jpeg
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400aea5d
lea rdx, [0x14011c168]
mov rcx, rdi
call fcn.1400d0944
test eax, eax
je 0x1400aea5d
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400aeb9d
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
jmp 0x1400aea61
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400aeb9d
mov qword [rsp + 0x30], rsi
lea r8d, [rdi + 1]
mov dword [rsp + 0x28], esi
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x1400ae851
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
lea ecx, [rdi + 2]
mov dword [rbp - 0x79], edx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
jne 0x1400aeacc
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400ae851
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r12
test rax, rax
jne 0x1400aeaf1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400ae851
mov r8d, dword [rbp - 0x79]
lea r9, [rbp - 0x79]
mov rdx, rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rbp - 0x69]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x1400aeae3
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400aeae3
lea rax, [rbp - 0x71]
xor r8d, r8d
lea r9, [0x1400f3140]
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
test eax, eax
jns 0x1400aeb58
mov qword [rbp - 0x71], rsi
mov rcx, qword [rbp - 0x69]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x1400ae851
mov rax, qword [rcx]
lea rdx, [rsp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
cmp qword [rsp + 0x48], rsi
jne 0x1400aec66
mov rcx, qword [rbp - 0x71]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
jmp 0x1400ae851
lea rdx, str.GdiplusStartup
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, rdi
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromFile
mov rcx, rdi
mov qword [rbp - 0x29], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateHBITMAPFromBitmap
mov rcx, rdi
mov qword [rbp - 0x79], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDisposeImage
mov rcx, rdi
mov qword [rbp - 0x41], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp - 0x61], 1
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x59], rsi
mov qword [rbp - 0x51], rsi
test r12, r12
je 0x1400aec5d
xor r8d, r8d
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x31]
call r12
test eax, eax
jne 0x1400aec5d
lea rdx, [rbp - 0x69]
mov rcx, rbx
call qword [rbp - 0x79]
test eax, eax
jne 0x1400aec56
mov rcx, qword [rbp - 0x69]
lea rdx, [rsp + 0x48]
mov r8d, 0xff000000
call qword [rbp - 0x41]
test eax, eax
je 0x1400aec4f
mov qword [rsp + 0x48], rsi
mov rcx, qword [rbp - 0x69]
call qword [rbp - 0x39]
mov rcx, qword [rbp - 0x31]
call qword [rbp - 0x29]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [rbp + 0x5f], sil
je 0x1400aed78
mov rcx, qword [rsp + 0x48]
cmp dword [r14], esi
je 0x1400aec90
lea rdx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400aed68
mov rcx, qword [rbp - 0x11]
lea r8, [rbp - 0x61]
mov edx, SafeArrayAllocDescriptor
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r15d, 0xffffffff
jne 0x1400aecdd
mov eax, dword [rbp - 0x5d]
test eax, eax
je 0x1400aed13
movd xmm2, dword [rbp - 0x59]
cvtdq2pd xmm2, xmm2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movd xmm1, r13d
divsd xmm2, xmm0
cvtdq2pd xmm1, xmm1
mulsd xmm2, xmm1
addsd xmm2, qword [0x14011c678]
cvttsd2si r15d, xmm2
jmp 0x1400aed13
mov eax, dword [rbp - 0x59]
test eax, eax
je 0x1400aed13
movd xmm2, dword [rbp - 0x5d]
cvtdq2pd xmm2, xmm2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movd xmm1, r15d
divsd xmm2, xmm0
cvtdq2pd xmm1, xmm1
mulsd xmm2, xmm1
addsd xmm2, qword [0x14011c678]
cvttsd2si r13d, xmm2
cmp dword [r14], esi
je 0x1400aed78
mov rcx, qword [rbp - 9]
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [rsp + 0x40], sil
jne 0x1400aed78
cmp byte [rsp + 0x41], sil
jne 0x1400aed78
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
mov r8d, dword [r14]
mov r9d, r13d
mov rdx, rbx
mov dword [rsp + 0x28], reloc.WSOCK32.dll_recv
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400ae853
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
jmp 0x1400ae851
cmp qword [rbp - 0x71], rsi
je 0x1400aedbc
test r13d, r13d
jne 0x1400aed8d
test r15d, r15d
jne 0x1400aed8d
mov esi, 4
mov rcx, qword [rsp + 0x48]
mov r9d, r15d
mov r8d, r13d
mov dword [rsp + 0x20], esi
xor edx, edx
call qword [sym.imp.USER32.dll_CopyImage]
mov rcx, qword [rbp - 0x71]
mov rbx, rax
mov rdx, qword [rcx]
call qword [rdx + reloc.WSOCK32.dll_recv]
mov rsi, qword [rbp + 0x77]
movzx r12d, byte [rbp + 0x47]
jmp 0x1400aee21
movzx r12d, byte [rbp + 0x47]
mov rsi, qword [rbp + 0x77]
test r13d, r13d
jne 0x1400aedef
test r15d, r15d
jne 0x1400aedef
test r12b, r12b
je 0x1400aedd9
test rsi, rsi
je 0x1400aedf4
cmp dword [rbp + 0x67], 1
jl 0x1400aede5
cmp dword [r14], 1
jne 0x1400aedef
mov rax, qword [rsp + 0x48]
jmp 0x1400ae853
test r12b, r12b
je 0x1400aee01
mov rax, rsi
neg rax
sbb eax, eax
and eax, 4
jmp 0x1400aee06
mov eax, reloc.WSOCK32.dll_ioctlsocket
mov edx, dword [r14]
mov r9d, r15d
mov rcx, qword [rsp + 0x48]
mov r8d, r13d
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CopyImage]
mov rbx, rax
cmp dword [rbp + 0x67], 0
jle 0x1400aee61
cmp dword [r14], 0
jne 0x1400aee61
lea rcx, [rbp - 0x21]
mov dword [rbp - 0x21], 1
mov qword [rbp - 0x11], rbx
mov qword [rbp - 9], rbx
call qword [sym.imp.USER32.dll_CreateIconIndirect]
mov rdi, rax
test r12b, r12b
jne 0x1400aee57
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, rdi
mov dword [r14], 1
cmp qword [rsp + 0x48], rbx
je 0x1400aee70
test rsi, rsi
je 0x1400aee70
mov byte [rsi], 0
mov rax, rbx
jmp 0x1400ae853