Function at 0x1400bbbf0
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 rdi, qword [rbp + 0x77]
xor r14d, r14d
mov qword [rsp + 0x48], r14
mov rsi, r9
mov dword [r9], 0xffffffff
mov r15d, r8d
mov r13d, edx
mov rbx, rcx
mov r12, rcx
test rdi, rdi
je 0x1400bbc36
mov byte [rdi], r14b
cmp word [rcx], r14w
je 0x1400bbdf2
mov r8d, 6
mov byte [rsp + 0x41], r14b
lea rdx, str.hicon:
mov byte [rbp + 0x47], r14b
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
je 0x1400bbc7a
mov r8d, 8
lea rdx, str.hbitmap:
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1400bbcea
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, r14d
add rbx, r12
cmp cx, 0x3a
sete al
mov dword [rsi], eax
cmp word [rbx], 0x2a
sete byte [rbp + 0x47]
jne 0x1400bbcb9
add rbx, 2
test rdi, rdi
je 0x1400bbcb9
mov byte [rdi], 1
mov rcx, rbx
call fcn.1400056a0
mov rcx, rbx
test al, al
je 0x1400bbcd6
xor edx, edx
lea r8d, [rdx + 0x10]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wcstoi64]
jmp 0x1400bbcdc
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi64]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400bbdf2
mov edx, 0x2e
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rdi, rax
test rax, rax
je 0x1400bbd04
add rdi, 2
mov rcx, qword [rsp + 0x48]
test rcx, rcx
jne 0x1400bbd92
mov r12d, dword [rbp + 0x67]
cmp r12d, 1
ja 0x1400bbdbf
test rdi, rdi
je 0x1400bbd92
lea rdx, [0x1400fa608]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbdbf
lea rdx, [0x1400fa610]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbdbf
lea rdx, [0x1400fdef0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbdbf
lea rdx, [0x1400fdef8]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbdbf
lea rdx, [0x1400fdf00]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbdbf
mov rcx, qword [rsp + 0x48]
mov byte [rsp + 0x40], r14b
test rdi, rdi
je 0x1400bbe60
lea rdx, [0x1400fa600]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400bbe0f
mov dword [rsi], 1
jmp 0x1400bbe5b
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 [rsi], 1
call fcn.1400bc440
mov qword [rsp + 0x48], rax
mov rcx, rax
cmp rax, 2
jae 0x1400bbe60
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
lea rdx, [0x1400fdf08]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbe55
lea rdx, [0x1400fdf10]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbe55
lea rdx, [0x1400fdf18]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov rcx, qword [rsp + 0x48]
test eax, eax
jne 0x1400bbe60
mov dword [rsi], r14d
jmp 0x1400bbe60
mov dword [rsi], 2
mov rcx, qword [rsp + 0x48]
cmp r13d, 0xffffffff
je 0x1400bbe6c
cmp r15d, 0xffffffff
jne 0x1400bbe7c
test r13d, r13d
je 0x1400bbe76
test r15d, r15d
jne 0x1400bbe7c
mov r15d, r14d
mov r13d, r14d
cmp r13d, 0xffffffff
je 0x1400bbe8c
mov byte [rbp + 0x5f], r14b
cmp r15d, 0xffffffff
jne 0x1400bbe90
mov byte [rbp + 0x5f], 1
movzx r12d, byte [rbp + 0x6f]
mov qword [rbp - 0x79], r14
test r12b, r12b
je 0x1400bbebf
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rsp + 0x48]
test rax, rax
movzx r12d, r12b
cmove r12d, r14d
mov qword [rbp - 0x79], rax
test rcx, rcx
jne 0x1400bbf7d
mov r8d, dword [rsi]
cmp r8d, 0xffffffff
jle 0x1400bbf7d
test r12b, r12b
jne 0x1400bbf7d
movzx ecx, byte [rbp + 0x5f]
mov eax, r14d
test cl, cl
mov dword [rsp + 0x28], 0x2010
mov r9d, r14d
mov rdx, rbx
cmove eax, r15d
cmove r9d, r13d
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rsp + 0x48], rax
mov rcx, rax
test rax, rax
je 0x1400bbf27
cmp byte [rbp + 0x5f], r14b
jne 0x1400bbf7d
cmp dword [rbp + 0x67], r14d
jne 0x1400bbf7d
jmp 0x1400bbdf4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400bbdf2
mov ecx, dword [rbp + 0x67]
test ecx, ecx
jle 0x1400bbf78
mov rax, qword [rbp + 0x7f]
mov edx, ecx
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov r9d, r15d
mov r8d, r13d
call fcn.1400bc440
mov qword [rsp + 0x48], rax
mov rcx, rax
cmp rax, 2
jb 0x1400bbdf2
mov byte [rsp + 0x40], 1
mov dword [rsi], 1
jmp 0x1400bbf7d
mov rcx, qword [rsp + 0x48]
mov qword [rbp - 0x71], r14
test rcx, rcx
jne 0x1400bc211
mov dword [rsi], r14d
test r12b, r12b
jne 0x1400bbfd3
test rdi, rdi
je 0x1400bbfd3
lea rdx, [0x1400fdf30]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbff2
lea rdx, str.jpeg
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbff2
lea rdx, [0x1400fdf48]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400bbff2
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400bc13c
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
jmp 0x1400bbff6
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400bc13c
mov qword [rsp + 0x30], r14
lea r8d, [rdi + 1]
mov dword [rsp + 0x28], r14d
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 0x1400bbdf2
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
lea ecx, [rdi + 2]
mov dword [rbp - 0x79], eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
jne 0x1400bc062
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400bbdf2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r12
test rax, rax
jne 0x1400bc087
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400bbdf2
mov r8d, dword [rbp - 0x79]
lea r9, [rbp - 0x79]
mov rdx, rax
mov qword [rsp + 0x20], r14
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 0x1400bc079
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400bc079
lea rax, [rbp - 0x71]
xor r8d, r8d
lea r9, [0x1400da640]
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov rcx, qword [rbp - 0x71]
test eax, eax
cmovs rcx, r14
mov qword [rbp - 0x71], rcx
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 0x1400bbdf2
mov rax, qword [rcx]
lea rdx, [rsp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
jne 0x1400bc211
mov rcx, qword [rbp - 0x71]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
jmp 0x1400bbdf2
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], r14
mov qword [rbp - 0x51], r14
test r12, r12
je 0x1400bc203
xor r8d, r8d
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x31]
call r12
test eax, eax
jne 0x1400bc203
lea rdx, [rbp - 0x69]
mov rcx, rbx
call qword [rbp - 0x79]
test eax, eax
jne 0x1400bc1fc
mov rcx, qword [rbp - 0x69]
lea rdx, [rsp + 0x48]
mov r8d, 0xff000000
call qword [rbp - 0x41]
mov rcx, qword [rsp + 0x48]
test eax, eax
cmovne rcx, r14
mov qword [rsp + 0x48], rcx
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]
mov rcx, qword [rsp + 0x48]
cmp byte [rbp + 0x5f], r14b
je 0x1400bc314
cmp dword [rsi], r14d
je 0x1400bc236
lea rdx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400bc355
mov rcx, qword [rbp - 0x11]
lea r8, [rbp - 0x61]
mov edx, SafeArrayAllocDescriptor
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r15d, 0xffffffff
jne 0x1400bc283
mov eax, dword [rbp - 0x5d]
test eax, eax
je 0x1400bc2b9
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 [0x1400ff478]
cvttsd2si r15d, xmm2
jmp 0x1400bc2b9
mov eax, dword [rbp - 0x59]
test eax, eax
je 0x1400bc2b9
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 [0x1400ff478]
cvttsd2si r13d, xmm2
cmp dword [rsi], r14d
je 0x1400bc30f
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], r14b
jne 0x1400bc30f
cmp byte [rsp + 0x41], r14b
jne 0x1400bc30f
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
mov r8d, dword [rsi]
mov eax, reloc.WSOCK32.dll_recv
mov dword [rsp + 0x28], eax
mov r9d, r13d
mov rdx, rbx
mov dword [rsp + 0x20], r15d
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400bbdf4
mov rcx, qword [rsp + 0x48]
cmp qword [rbp - 0x71], r14
je 0x1400bc365
test r13d, r13d
jne 0x1400bc32a
test r15d, r15d
jne 0x1400bc32a
mov r14d, 4
mov r9d, r15d
mov dword [rsp + 0x20], r14d
mov r8d, r13d
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 r14, qword [rbp + 0x77]
movzx r12d, byte [rbp + 0x47]
jmp 0x1400bc3c1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
jmp 0x1400bbdf2
movzx r12d, byte [rbp + 0x47]
mov r14, qword [rbp + 0x77]
test r13d, r13d
jne 0x1400bc395
test r15d, r15d
jne 0x1400bc395
test r12b, r12b
je 0x1400bc382
test r14, r14
je 0x1400bc395
cmp dword [rbp + 0x67], 1
jl 0x1400bc38d
cmp dword [rsi], 1
jne 0x1400bc395
mov rax, rcx
jmp 0x1400bbdf4
test r12b, r12b
je 0x1400bc3a7
mov rax, r14
neg rax
sbb eax, eax
and eax, 4
jmp 0x1400bc3ac
mov eax, reloc.WSOCK32.dll_ioctlsocket
mov edx, dword [rsi]
mov r9d, r15d
mov r8d, r13d
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CopyImage]
mov rbx, rax
cmp dword [rbp + 0x67], 0
jle 0x1400bc3ff
cmp dword [rsi], 0
jne 0x1400bc3ff
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 0x1400bc3f6
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, rdi
mov dword [rsi], 1
cmp qword [rsp + 0x48], rbx
je 0x1400bc40f
test r14, r14
je 0x1400bc40f
mov byte [r14], 0
mov rax, rbx
jmp 0x1400bbdf4