Function at 0x1400e7a80
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 r12
push r13
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xd8
xor r12d, r12d
mov dword [r9], 0xffffffff
mov rsi, r9
mov r13d, r8d
mov r15d, edx
mov rbx, rcx
mov qword [rbp - 0x79], r12
cmp word [rcx], r12w
jne 0x1400e7ac9
xor eax, eax
add rsp, 0xd8
pop r15
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret
lea rdx, str.hicon:
mov r8d, 6
mov qword [rsp + 0xd0], r14
mov byte [rbp - 0x80], r12b
mov byte [rbp + 0x67], r12b
call fcn.140108e4c
test eax, eax
je 0x1400e7b08
lea rdx, str.hbitmap:
mov r8d, 8
mov rcx, rbx
call fcn.140108e4c
test eax, eax
jne 0x1400e7b69
cmp word [rbx + 0xa], 0x3a
jne 0x1400e7b1b
mov dword [rsi], 1
add rbx, 0xc
jmp 0x1400e7b22
mov dword [rsi], r12d
add rbx, 0x10
cmp word [rbx], 0x2a
mov byte [rbp - 0x80], 1
sete r14b
mov byte [rbp + 0x67], r14b
test r14b, r14b
je 0x1400e7b3b
add rbx, 2
mov rcx, rbx
call fcn.140013c70
mov rcx, rbx
test al, al
je 0x1400e7b57
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.14010a4d8
jmp 0x1400e7b5c
call fcn.140109998
mov qword [rbp - 0x79], rax
test rax, rax
je 0x1400e8242
mov edx, 0x2e
mov rcx, rbx
mov qword [rsp + 0x118], rdi
call fcn.14010a5e8
mov rdi, rax
test rax, rax
je 0x1400e7b8a
add rdi, 2
mov rax, qword [rbp - 0x79]
mov r14d, dword [rbp + 0x6f]
test rax, rax
jne 0x1400e7c09
cmp r14d, 1
ja 0x1400e7c32
test rdi, rdi
je 0x1400e7c09
lea rdx, [0x140150638]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7c32
lea rdx, [0x140150640]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7c32
lea rdx, [0x1401526a8]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7c32
lea rdx, [0x1401526b0]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7c32
lea rdx, [0x1401526b8]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7c32
mov rax, qword [rbp - 0x79]
mov byte [rsp + 0x40], r12b
test rdi, rdi
je 0x1400e7cb4
lea rdx, [0x140150630]
mov rcx, rdi
call fcn.140108424
test eax, eax
jne 0x1400e7c68
mov dword [rsi], 1
jmp 0x1400e7cb0
mov rax, qword [rbp + 0x7f]
mov r9d, r13d
mov r8d, r15d
mov edx, r14d
mov rcx, rbx
mov byte [rsp + 0x40], 1
mov qword [rsp + 0x20], rax
mov dword [rsi], 1
call fcn.1400e8280
mov qword [rbp - 0x79], rax
cmp rax, 2
jae 0x1400e7cb4
xor eax, eax
jmp 0x1400e823a
lea rdx, [0x1401526c0]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7caa
lea rdx, [0x1401526c8]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7caa
lea rdx, [0x1401526d0]
mov rcx, rdi
call fcn.140108424
test eax, eax
mov rax, qword [rbp - 0x79]
jne 0x1400e7cb4
mov dword [rsi], r12d
jmp 0x1400e7cb4
mov dword [rsi], 2
mov rax, qword [rbp - 0x79]
cmp r15d, 0xffffffff
je 0x1400e7cc0
cmp r13d, 0xffffffff
jne 0x1400e7cca
test r15d, r15d
je 0x1400e7cdc
test r13d, r13d
je 0x1400e7cdc
cmp r15d, 0xffffffff
je 0x1400e7cd6
cmp r13d, 0xffffffff
jne 0x1400e7ce2
mov byte [rbp + 0x4f], 1
jmp 0x1400e7ce6
mov r13d, r12d
mov r15d, r12d
mov byte [rbp + 0x4f], r12b
movzx r14d, byte [rbp + 0x77]
mov qword [rbp - 0x71], r12
test r14b, r14b
je 0x1400e7d14
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
movzx r14d, r14b
test rax, rax
mov qword [rbp - 0x71], rax
mov rax, qword [rbp - 0x79]
cmove r14d, r12d
test rax, rax
jne 0x1400e7dc9
mov r8d, dword [rsi]
cmp r8d, 0xffffffff
jle 0x1400e7dc9
test r14b, r14b
jne 0x1400e7dc9
cmp byte [rbp + 0x4f], r12b
je 0x1400e7d41
mov r9d, r12d
mov eax, r12d
jmp 0x1400e7d47
mov r9d, r15d
mov eax, r13d
mov rdx, rbx
xor ecx, ecx
mov dword [rsp + 0x28], 0x2010
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rbp - 0x79], rax
test rax, rax
je 0x1400e7d78
cmp byte [rbp + 0x4f], r12b
jne 0x1400e7dc9
cmp dword [rbp + 0x6f], r12d
jne 0x1400e7dc9
jmp 0x1400e823a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400e81a8
mov eax, dword [rbp + 0x6f]
test eax, eax
jle 0x1400e7dc5
mov rcx, qword [rbp + 0x7f]
mov r9d, r13d
mov r8d, r15d
mov qword [rsp + 0x20], rcx
mov rcx, rbx
mov edx, eax
call fcn.1400e8280
mov qword [rbp - 0x79], rax
cmp rax, 2
jb 0x1400e81a8
mov byte [rsp + 0x40], 1
mov dword [rsi], 1
jmp 0x1400e7dc9
mov rax, qword [rbp - 0x79]
mov qword [rbp - 0x69], r12
test rax, rax
jne 0x1400e8059
mov dword [rsi], r12d
test r14b, r14b
jne 0x1400e7e1c
test rdi, rdi
je 0x1400e7e1c
lea rdx, [0x1401526e8]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7e3b
lea rdx, str.jpeg
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7e3b
lea rdx, [0x140152700]
mov rcx, rdi
call fcn.140108424
test eax, eax
je 0x1400e7e3b
mov rdi, qword [rbp - 0x71]
test rdi, rdi
jne 0x1400e7f88
lea rcx, str.gdiplus
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
jmp 0x1400e7e3f
mov rdi, qword [rbp - 0x71]
test rdi, rdi
jne 0x1400e7f88
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 r14, rax
cmp rax, 0xffffffffffffffff
je 0x1400e81a8
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [rdi + 2]
mov edx, eax
mov dword [rbp - 0x71], eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
jne 0x1400e7eac
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400e823a
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r14
test rax, rax
jne 0x1400e7ed3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1400e823a
mov r8d, dword [rbp - 0x71]
lea r9, [rbp - 0x71]
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, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rbp - 0x61]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x1400e7ec3
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x1400e7ec3
lea rax, [rbp - 0x69]
lea r9, [0x140127140]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov rcx, qword [rbp - 0x69]
test eax, eax
cmovs rcx, r12
mov qword [rbp - 0x69], rcx
mov rcx, qword [rbp - 0x61]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x1400e81a8
mov rax, qword [rcx]
lea rdx, [rbp - 0x79]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov rax, qword [rbp - 0x79]
test rax, rax
jne 0x1400e8059
mov rcx, qword [rbp - 0x69]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
xor eax, eax
jmp 0x1400e823a
lea rdx, str.GdiplusStartup
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, rdi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromFile
mov rcx, rdi
mov qword [rbp - 0x31], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateHBITMAPFromBitmap
mov rcx, rdi
mov qword [rbp - 0x71], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDisposeImage
mov rcx, rdi
mov qword [rbp - 0x21], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp - 0x59], 1
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x49], r12
mov qword [rbp - 0x29], rax
test r14, r14
je 0x1400e804c
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x39]
xor r8d, r8d
call r14
test eax, eax
jne 0x1400e804c
lea rdx, [rbp - 0x61]
mov rcx, rbx
call qword [rbp - 0x71]
test eax, eax
jne 0x1400e8045
mov rcx, qword [rbp - 0x61]
lea rdx, [rbp - 0x79]
mov r8d, 0xff000000
call qword [rbp - 0x21]
mov rcx, qword [rbp - 0x79]
test eax, eax
cmovne rcx, r12
mov qword [rbp - 0x79], rcx
mov rcx, qword [rbp - 0x61]
call qword [rbp - 0x29]
mov rcx, qword [rbp - 0x39]
call qword [rbp - 0x31]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [rbp - 0x79]
cmp byte [rbp + 0x4f], r12b
je 0x1400e815e
cmp dword [rsi], r12d
je 0x1400e8081
lea rdx, [rbp - 0x19]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x1400e819e
mov rax, qword [rbp - 9]
lea r8, [rbp - 0x59]
mov edx, SafeArrayAllocDescriptor
mov rcx, rax
call qword [sym.imp.GDI32.dll_GetObjectW]
cmp r13d, 0xffffffff
jne 0x1400e80d1
mov eax, dword [rbp - 0x55]
test eax, eax
je 0x1400e8107
movd xmm2, dword [rbp - 0x51]
movd xmm0, eax
movd xmm1, r15d
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm2, xmm0
mulsd xmm2, xmm1
addsd xmm2, qword [0x140152fe0]
cvttsd2si r13d, xmm2
jmp 0x1400e8107
mov eax, dword [rbp - 0x51]
test eax, eax
je 0x1400e8107
movd xmm2, dword [rbp - 0x55]
movd xmm0, eax
movd xmm1, r13d
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm2, xmm0
mulsd xmm2, xmm1
addsd xmm2, qword [0x140152fe0]
cvttsd2si r15d, xmm2
cmp dword [rsi], r12d
je 0x1400e815a
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], r12b
jne 0x1400e815a
cmp byte [rbp - 0x80], r12b
jne 0x1400e815a
mov rcx, qword [rbp - 0x79]
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.OLEAUT32.dll_SafeArrayGetDim
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_LoadImageW]
jmp 0x1400e823a
mov rax, qword [rbp - 0x79]
cmp qword [rbp - 0x69], r12
je 0x1400e81af
test r15d, r15d
jne 0x1400e8174
test r13d, r13d
jne 0x1400e8174
mov r12d, 4
mov r9d, r13d
mov r8d, r15d
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x20], r12d
call qword [sym.imp.USER32.dll_CopyImage]
mov rcx, qword [rbp - 0x69]
mov rdx, qword [rcx]
mov rbx, rax
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetDim]
movzx r14d, byte [rbp + 0x67]
jmp 0x1400e81f9
mov rcx, qword [rbp - 0x79]
call qword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
jmp 0x1400e823a
test r15d, r15d
jne 0x1400e81d0
test r13d, r13d
jne 0x1400e81d0
movzx r14d, byte [rbp + 0x67]
test r14b, r14b
jne 0x1400e81e0
cmp dword [rbp + 0x6f], 1
jl 0x1400e823a
cmp dword [rsi], 1
jne 0x1400e81da
jmp 0x1400e823a
movzx r14d, byte [rbp + 0x67]
test r14b, r14b
jne 0x1400e81e0
mov r12d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov edx, dword [rsi]
mov r9d, r13d
mov r8d, r15d
mov rcx, rax
mov dword [rsp + 0x20], r12d
call qword [sym.imp.USER32.dll_CopyImage]
mov rbx, rax
cmp dword [rbp + 0x6f], 0
jle 0x1400e8237
cmp dword [rsi], 0
jne 0x1400e8237
lea rcx, [rbp - 0x19]
mov dword [rbp - 0x19], 1
mov qword [rbp - 9], rbx
mov qword [rbp - 1], rbx
call qword [sym.imp.USER32.dll_CreateIconIndirect]
mov rdi, rax
test r14b, r14b
jne 0x1400e822e
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, rdi
mov dword [rsi], 1
mov rax, rbx
mov rdi, qword [rsp + 0x118]
mov r14, qword [rsp + 0xd0]
add rsp, 0xd8
pop r15
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret