Function at 0x1400e1e60
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 - 7]
sub rsp, 0xd0
mov rdi, qword [rbp + 0x77]
xor r12d, r12d
mov rsi, r9
mov r14d, r8d
mov r15d, edx
mov rbx, rcx
mov qword [rsp + 0x48], r12
mov dword [r9], 0xffffffff
test rdi, rdi
je 0x1400e1e9e
mov byte [rdi], r12b
cmp word [rcx], r12w
jne 0x1400e1eab
xor eax, eax
jmp 0x1400e2680
lea rdx, str.hicon:
mov r8d, 6
mov qword [rsp + 0x118], r13
mov byte [rsp + 0x41], r12b
mov byte [rbp + 0x47], r12b
call qword [sym.imp.MSVCR100.dll__wcsnicmp]
test eax, eax
je 0x1400e1eed
lea rdx, str.hbitmap:
mov r8d, 8
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll__wcsnicmp]
test eax, eax
jne 0x1400e1f5a
cmp word [rbx + 0xa], 0x3a
jne 0x1400e1f00
mov dword [rsi], 1
add rbx, 0xc
jmp 0x1400e1f07
mov dword [rsi], r12d
add rbx, 0x10
cmp word [rbx], 0x2a
mov byte [rsp + 0x41], 1
sete r13b
mov byte [rbp + 0x47], r13b
test r13b, r13b
je 0x1400e1f29
add rbx, 2
test rdi, rdi
je 0x1400e1f29
mov byte [rdi], 1
mov rcx, rbx
call fcn.140005040
mov rcx, rbx
test al, al
je 0x1400e1f46
xor edx, edx
lea r8d, [rdx + 0x10]
call qword [sym.imp.MSVCR100.dll__wcstoi64]
jmp 0x1400e1f4c
call qword [sym.imp.MSVCR100.dll__wtoi64]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400e25c3
mov edx, 0x2e
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_wcsrchr]
mov rdi, rax
test rax, rax
je 0x1400e1f74
add rdi, 2
mov rcx, qword [rsp + 0x48]
mov r13d, dword [rbp + 0x67]
test rcx, rcx
jne 0x1400e1ffe
cmp r13d, 1
ja 0x1400e202b
test rdi, rdi
je 0x1400e1ffe
lea rdx, [0x140122b50]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e202b
lea rdx, [0x140122b58]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e202b
lea rdx, [0x140126ee8]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e202b
lea rdx, [0x140126ef0]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e202b
lea rdx, [0x140126ef8]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e202b
mov rcx, qword [rsp + 0x48]
mov byte [rsp + 0x40], r12b
test rdi, rdi
je 0x1400e20b6
lea rdx, [0x140122b48]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
jne 0x1400e2065
mov dword [rsi], 1
jmp 0x1400e20b1
mov rax, qword [rbp + 0x7f]
mov r9d, r14d
mov r8d, r15d
mov edx, r13d
mov rcx, rbx
mov byte [rsp + 0x40], 1
mov qword [rsp + 0x20], rax
mov dword [rsi], 1
call fcn.1400e26c0
mov rcx, rax
mov qword [rsp + 0x48], rax
cmp rax, 2
jae 0x1400e20b6
xor eax, eax
jmp 0x1400e2678
lea rdx, [0x140126f00]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e20ab
lea rdx, [0x140126f08]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e20ab
lea rdx, [0x140126f10]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
mov rcx, qword [rsp + 0x48]
test eax, eax
jne 0x1400e20b6
mov dword [rsi], r12d
jmp 0x1400e20b6
mov dword [rsi], 2
mov rcx, qword [rsp + 0x48]
cmp r15d, 0xffffffff
je 0x1400e20c2
cmp r14d, 0xffffffff
jne 0x1400e20cc
test r15d, r15d
je 0x1400e20de
test r14d, r14d
je 0x1400e20de
cmp r15d, 0xffffffff
je 0x1400e20d8
cmp r14d, 0xffffffff
jne 0x1400e20e4
mov byte [rbp + 0x5f], 1
jmp 0x1400e20e8
mov r14d, r12d
mov r15d, r12d
mov byte [rbp + 0x5f], r12b
movzx r13d, byte [rbp + 0x6f]
mov qword [rbp - 0x79], r12
test r13b, r13b
je 0x1400e2117
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rsp + 0x48]
movzx r13d, r13b
test rax, rax
mov qword [rbp - 0x79], rax
cmove r13d, r12d
test rcx, rcx
jne 0x1400e21d9
mov r8d, dword [rsi]
cmp r8d, 0xffffffff
jle 0x1400e21d9
test r13b, r13b
jne 0x1400e21d9
cmp byte [rbp + 0x5f], r12b
je 0x1400e2144
mov r9d, r12d
mov eax, r12d
jmp 0x1400e214a
mov r9d, r15d
mov eax, r14d
mov rdx, rbx
xor ecx, ecx
mov dword [rsp + 0x28], 0x2010
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov rcx, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400e2183
cmp byte [rbp + 0x5f], r12b
jne 0x1400e21d9
mov eax, dword [rbp + 0x67]
test eax, eax
jne 0x1400e21d9
mov rax, rcx
jmp 0x1400e2678
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400e25c3
mov eax, dword [rbp + 0x67]
test eax, eax
jle 0x1400e21d4
mov rcx, qword [rbp + 0x7f]
mov r9d, r14d
mov r8d, r15d
mov qword [rsp + 0x20], rcx
mov rcx, rbx
mov edx, eax
call fcn.1400e26c0
mov rcx, rax
mov qword [rsp + 0x48], rax
cmp rax, 2
jb 0x1400e25c3
mov byte [rsp + 0x40], 1
mov dword [rsi], 1
jmp 0x1400e21d9
mov rcx, qword [rsp + 0x48]
mov qword [rbp - 0x71], r12
test rcx, rcx
jne 0x1400e2472
mov dword [rsi], r12d
test r13b, r13b
jne 0x1400e222f
test rdi, rdi
je 0x1400e222f
lea rdx, [0x140126f28]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e224e
lea rdx, str.jpeg
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e224e
lea rdx, [0x140126f40]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
je 0x1400e224e
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400e239d
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
jmp 0x1400e2252
mov rdi, qword [rbp - 0x79]
test rdi, rdi
jne 0x1400e239d
mov qword [rsp + 0x30], r12
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1400e25c3
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [rdi + 2]
mov edx, eax
mov dword [rbp - 0x79], eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
jne 0x1400e22bf
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400e2678
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r13
test rax, rax
jne 0x1400e22e6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1400e2678
mov r8d, dword [rbp - 0x79]
lea r9, [rbp - 0x79]
mov rdx, rax
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r13
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 0x1400e22d6
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400e22d6
lea rax, [rbp - 0x71]
lea r9, [0x140103570]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov rcx, qword [rbp - 0x71]
test eax, eax
cmovs rcx, r12
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 0x1400e25c3
mov rax, qword [rcx]
lea rdx, [rsp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
jne 0x1400e2472
mov rcx, qword [rbp - 0x71]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
xor eax, eax
jmp 0x1400e2678
lea rdx, str.GdiplusStartup
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, rdi
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromFile
mov rcx, rdi
mov qword [rbp - 0x39], 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 - 0x29], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp - 0x61], 1
mov qword [rbp - 0x59], r12
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x31], rax
test r13, r13
je 0x1400e2464
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x41]
xor r8d, r8d
call r13
test eax, eax
jne 0x1400e2464
lea rdx, [rbp - 0x69]
mov rcx, rbx
call qword [rbp - 0x79]
test eax, eax
jne 0x1400e245d
mov rcx, qword [rbp - 0x69]
lea rdx, [rsp + 0x48]
mov r8d, 0xff000000
call qword [rbp - 0x29]
mov rcx, qword [rsp + 0x48]
test eax, eax
cmovne rcx, r12
mov qword [rsp + 0x48], rcx
mov rcx, qword [rbp - 0x69]
call qword [rbp - 0x31]
mov rcx, qword [rbp - 0x41]
call qword [rbp - 0x39]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, qword [rsp + 0x48]
cmp byte [rbp + 0x5f], r12b
je 0x1400e2574
cmp dword [rsi], r12d
je 0x1400e2497
lea rdx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400e25b8
mov rcx, qword [rbp - 0x11]
lea r8, [rbp - 0x61]
mov edx, SafeArrayAllocDescriptor
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r14d, 0xffffffff
jne 0x1400e24e4
mov eax, dword [rbp - 0x5d]
test eax, eax
je 0x1400e251a
movd xmm2, dword [rbp - 0x59]
movd xmm0, eax
movd xmm1, r15d
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm2, xmm0
mulsd xmm2, xmm1
addsd xmm2, qword [0x1401279b0]
cvttsd2si r14d, xmm2
jmp 0x1400e251a
mov eax, dword [rbp - 0x59]
test eax, eax
je 0x1400e251a
movd xmm2, dword [rbp - 0x5d]
movd xmm0, eax
movd xmm1, r14d
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm2, xmm0
mulsd xmm2, xmm1
addsd xmm2, qword [0x1401279b0]
cvttsd2si r15d, xmm2
cmp dword [rsi], r12d
je 0x1400e256f
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], r12b
jne 0x1400e256f
cmp byte [rsp + 0x41], r12b
jne 0x1400e256f
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
mov r8d, dword [rsi]
mov r9d, r15d
mov rdx, rbx
xor ecx, ecx
mov dword [rsp + 0x28], reloc.WSOCK32.dll_recv
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400e2678
mov rcx, qword [rsp + 0x48]
cmp qword [rbp - 0x71], r12
je 0x1400e25ca
test r15d, r15d
jne 0x1400e258a
test r14d, r14d
jne 0x1400e258a
mov r12d, 4
mov r9d, r14d
mov r8d, r15d
xor edx, edx
mov dword [rsp + 0x20], r12d
call qword [sym.imp.USER32.dll_CopyImage]
mov rcx, qword [rbp - 0x71]
mov rdx, qword [rcx]
mov rbx, rax
call qword [rdx + reloc.WSOCK32.dll_recv]
mov r12, qword [rbp + 0x77]
mov edi, dword [rbp + 0x67]
movzx r13d, byte [rbp + 0x47]
jmp 0x1400e2628
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
jmp 0x1400e2678
movzx r13d, byte [rbp + 0x47]
mov r12, qword [rbp + 0x77]
test r15d, r15d
jne 0x1400e25f9
test r14d, r14d
jne 0x1400e25f9
test r13b, r13b
je 0x1400e25e7
test r12, r12
je 0x1400e25f9
mov edi, dword [rbp + 0x67]
cmp edi, 1
jl 0x1400e25f4
cmp dword [rsi], 1
jne 0x1400e25fc
mov rax, rcx
jmp 0x1400e2678
mov edi, dword [rbp + 0x67]
test r13b, r13b
je 0x1400e260e
mov rax, r12
neg rax
sbb edx, edx
and edx, 4
jmp 0x1400e2613
mov edx, reloc.WSOCK32.dll_ioctlsocket
mov dword [rsp + 0x20], edx
mov edx, dword [rsi]
mov r9d, r14d
mov r8d, r15d
call qword [sym.imp.USER32.dll_CopyImage]
mov rbx, rax
test edi, edi
jle 0x1400e2664
cmp dword [rsi], 0
jne 0x1400e2664
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 r13b, r13b
jne 0x1400e265b
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, rdi
mov dword [rsi], 1
cmp qword [rsp + 0x48], rbx
je 0x1400e2675
test r12, r12
je 0x1400e2675
mov byte [r12], 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