Function at 0x1400d7d80
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 rbx, qword [rbp + 0x77]
xor edi, edi
mov r12d, dword [rbp + 0x67]
mov rsi, r9
mov qword [rsp + 0x48], rdi
mov r15d, r8d
mov dword [r9], 0xffffffff
mov r13d, edx
mov r14, rcx
test rbx, rbx
je 0x1400d7dc6
mov byte [rbx], dil
cmp word [rcx], di
je 0x1400d7f2a
mov r8d, 6
mov byte [rsp + 0x41], dil
lea rdx, str.hicon:
mov byte [rbp + 0x47], dil
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
je 0x1400d7e09
mov r8d, 8
lea rdx, str.hbitmap:
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1400d7e5f
movzx ecx, word [r14 + 0xa]
mov eax, reloc.WSOCK32.dll_ioctlsocket
cmp cx, 0x3a
mov byte [rsp + 0x41], 1
mov edx, reloc.WSOCK32.dll_recv
cmovne eax, edx
add r14, rax
mov eax, edi
cmp cx, 0x3a
sete al
mov dword [rsi], eax
cmp word [r14], 0x2a
sete byte [rbp + 0x47]
jne 0x1400d7e49
add r14, 2
test rbx, rbx
je 0x1400d7e49
mov byte [rbx], 1
mov rcx, r14
call fcn.140005d80
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400d7f2a
mov edx, 0x2e
mov rcx, r14
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
lea rbx, [rax + 2]
cmove rbx, rax
cmp qword [rsp + 0x48], rdi
jne 0x1400d7f47
cmp r12d, 1
ja 0x1400d7ef6
test rbx, rbx
je 0x1400d7f47
lea rdx, [0x140119150]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7ef6
lea rdx, [0x140119158]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7ef6
lea rdx, [0x14011cf60]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7ef6
lea rdx, [0x14011cf68]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7ef6
lea rdx, [0x14011cf70]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400d7f47
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, r14
mov dword [rsi], 1
call fcn.1400d8580
mov qword [rsp + 0x48], rax
cmp rax, 2
jae 0x1400d7fb3
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], dil
test rbx, rbx
je 0x1400d7fb3
lea rdx, [0x140119148]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400d7f6d
mov dword [rsi], 1
jmp 0x1400d7fb3
lea rdx, [0x14011cf78]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7fad
lea rdx, [0x14011cf80]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d7fad
lea rdx, [0x14011cf88]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400d7fb3
mov dword [rsi], edi
jmp 0x1400d7fb3
mov dword [rsi], 2
cmp r13d, 0xffffffff
je 0x1400d7fc4
cmp r15d, 0xffffffff
jne 0x1400d7fe1
test r13d, r13d
je 0x1400d7fc9
test r15d, r15d
jne 0x1400d7fd5
mov r15d, edi
mov byte [rbp + 0x5f], dil
mov r13d, edi
jmp 0x1400d7feb
cmp r13d, 0xffffffff
je 0x1400d7fe7
cmp r15d, 0xffffffff
je 0x1400d7fe7
mov byte [rbp + 0x5f], dil
jmp 0x1400d7feb
mov byte [rbp + 0x5f], 1
movzx r12d, byte [rbp + 0x6f]
mov qword [rbp - 0x79], rdi
test r12b, r12b
je 0x1400d8011
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
mov qword [rbp - 0x79], rax
cmove r12d, edi
cmp qword [rsp + 0x48], rdi
jne 0x1400d80c2
mov r8d, dword [rsi]
cmp r8d, 0xffffffff
jle 0x1400d80c2
test r12b, r12b
jne 0x1400d80c2
cmp byte [rbp + 0x5f], dil
je 0x1400d803f
mov r9d, edi
mov eax, edi
jmp 0x1400d8045
mov r9d, r13d
mov eax, r15d
mov dword [rsp + 0x28], 0x2010
mov rdx, r14
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400d8076
cmp byte [rbp + 0x5f], dil
jne 0x1400d80c2
cmp dword [rbp + 0x67], edi
jne 0x1400d80c2
jmp 0x1400d7f2c
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400d7f2a
mov eax, dword [rbp + 0x67]
test eax, eax
jle 0x1400d80c2
mov rcx, qword [rbp + 0x7f]
mov r9d, r15d
mov qword [rsp + 0x20], rcx
mov r8d, r13d
mov rcx, r14
mov edx, eax
call fcn.1400d8580
mov qword [rsp + 0x48], rax
cmp rax, 2
jb 0x1400d7f2a
mov byte [rsp + 0x40], 1
mov dword [rsi], 1
mov qword [rbp - 0x71], rdi
cmp qword [rsp + 0x48], rdi
jne 0x1400d8345
mov dword [rsi], edi
test r12b, r12b
jne 0x1400d8119
test rbx, rbx
je 0x1400d8119
lea rdx, [0x14011cfa0]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d8138
lea rdx, str.jpeg
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d8138
lea rdx, [0x14011cfb8]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x1400d8138
mov rbx, qword [rbp - 0x79]
test rbx, rbx
jne 0x1400d827c
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
jmp 0x1400d813c
mov rbx, qword [rbp - 0x79]
test rbx, rbx
jne 0x1400d827c
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
mov edx, 0x80000000
mov r8d, 1
mov dword [rsp + 0x20], 3
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x1400d7f2a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov ecx, 2
mov dword [rbp - 0x79], edx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbx, rax
test rax, rax
jne 0x1400d81ab
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400d7f2a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r12
test rax, rax
jne 0x1400d81d0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400d7f2a
mov r8d, dword [rbp - 0x79]
lea r9, [rbp - 0x79]
mov rdx, rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
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, rbx
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x1400d81c2
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400d81c2
lea rax, [rbp - 0x71]
xor r8d, r8d
lea r9, [0x1400f9690]
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
test eax, eax
jns 0x1400d8237
mov qword [rbp - 0x71], rdi
mov rcx, qword [rbp - 0x69]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x1400d7f2a
mov rax, qword [rcx]
lea rdx, [rsp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
cmp qword [rsp + 0x48], rdi
jne 0x1400d8345
mov rcx, qword [rbp - 0x71]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
jmp 0x1400d7f2a
lea rdx, str.GdiplusStartup
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, rbx
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromFile
mov rcx, rbx
mov qword [rbp - 0x29], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateHBITMAPFromBitmap
mov rcx, rbx
mov qword [rbp - 0x79], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDisposeImage
mov rcx, rbx
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], rdi
mov qword [rbp - 0x51], rdi
test r12, r12
je 0x1400d833c
xor r8d, r8d
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x31]
call r12
test eax, eax
jne 0x1400d833c
lea rdx, [rbp - 0x69]
mov rcx, r14
call qword [rbp - 0x79]
test eax, eax
jne 0x1400d8335
mov rcx, qword [rbp - 0x69]
lea rdx, [rsp + 0x48]
mov r8d, 0xff000000
call qword [rbp - 0x41]
test eax, eax
je 0x1400d832e
mov qword [rsp + 0x48], rdi
mov rcx, qword [rbp - 0x69]
call qword [rbp - 0x39]
mov rcx, qword [rbp - 0x31]
call qword [rbp - 0x29]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [rbp + 0x5f], dil
je 0x1400d8455
mov rcx, qword [rsp + 0x48]
cmp dword [rsi], edi
je 0x1400d836e
lea rdx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400d8445
mov rcx, qword [rbp - 0x11]
lea r8, [rbp - 0x61]
mov edx, SafeArrayAllocDescriptor
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r15d, 0xffffffff
jne 0x1400d83bb
mov eax, dword [rbp - 0x5d]
test eax, eax
je 0x1400d83f1
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 [0x14011e498]
cvttsd2si r15d, xmm2
jmp 0x1400d83f1
mov eax, dword [rbp - 0x59]
test eax, eax
je 0x1400d83f1
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 [0x14011e498]
cvttsd2si r13d, xmm2
cmp dword [rsi], edi
je 0x1400d8455
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], dil
jne 0x1400d8455
cmp byte [rsp + 0x41], dil
jne 0x1400d8455
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
mov r8d, dword [rsi]
mov r9d, r13d
mov rdx, r14
mov dword [rsp + 0x28], reloc.WSOCK32.dll_recv
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400d7f2c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
jmp 0x1400d7f2a
cmp qword [rbp - 0x71], rdi
je 0x1400d8499
test r13d, r13d
jne 0x1400d846a
test r15d, r15d
jne 0x1400d846a
mov edi, 4
mov rcx, qword [rsp + 0x48]
mov r9d, r15d
mov r8d, r13d
mov dword [rsp + 0x20], edi
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 0x1400d84fc
movzx r12d, byte [rbp + 0x47]
mov r14, qword [rbp + 0x77]
test r13d, r13d
jne 0x1400d84cb
test r15d, r15d
jne 0x1400d84cb
test r12b, r12b
je 0x1400d84b6
test r14, r14
je 0x1400d84d0
cmp dword [rbp + 0x67], 1
jl 0x1400d84c1
cmp dword [rsi], 1
jne 0x1400d84cb
mov rax, qword [rsp + 0x48]
jmp 0x1400d7f2c
test r12b, r12b
je 0x1400d84dd
mov rax, r14
neg rax
sbb eax, eax
and eax, 4
jmp 0x1400d84e2
mov eax, reloc.WSOCK32.dll_ioctlsocket
mov edx, dword [rsi]
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 0x1400d853a
cmp dword [rsi], 0
jne 0x1400d853a
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 0x1400d8531
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, rdi
mov dword [rsi], 1
cmp qword [rsp + 0x48], rbx
je 0x1400d854a
test r14, r14
je 0x1400d854a
mov byte [r14], 0
mov rax, rbx
jmp 0x1400d7f2c