Function at 0x4e4a60
Capabilities:
Check if file exists
Get file attributes
Get file size
Link many functions at runtime
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], 0
push ebx
mov ebx, dword [esp + 0x58]
push ebp
mov ebp, dword [esp + 0x68]
push esi
push edi
mov edi, ebx
mov dword [ebp], 0xffffffff
test eax, eax
je 0x4e4a8b
mov byte [eax], 0
cmp word [ebx], 0
je 0x4e4bf1
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
push 6
push str.HICON:
push ebx
mov byte [esp + 0x1f], 0
mov byte [esp + 0x7c], 0
call esi
add esp, 0xc
test eax, eax
je 0x4e4ac7
push 8
push str.HBITMAP:
push ebx
call esi
add esp, 0xc
test eax, eax
jne 0x4e4b1c
movzx ecx, word [ebx + 0xa]
xor ebx, ebx
cmp ecx, 0x3a
mov byte [esp + 0x13], 1
setne bl
xor eax, eax
lea ebx, [ebx*4 + 0xc]
add ebx, edi
cmp ecx, 0x3a
sete al
mov dword [ebp], eax
movzx eax, word [ebx]
cmp eax, 0x2a
sete byte [esp + 0x70]
jne 0x4e4b07
mov eax, dword [esp + 0x7c]
add ebx, 2
test eax, eax
je 0x4e4b07
mov byte [eax], 1
push ebx
call fcn.004e6170
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4e4bf1
push 0x2e
push ebx
call sub.VCRUNTIME140.dll_wcsrchr
mov esi, eax
add esp, 8
test esi, esi
je 0x4e4b30
add esi, 2
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x4e4b98
cmp dword [esp + 0x74], 1
ja 0x4e4bbd
test esi, esi
je 0x4e4b98
push 0x5031bc
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4bbd
push 0x5031c4
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4bbd
push 0x507484
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4bbd
push 0x50748c
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4bbd
push 0x507494
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4bbd
mov eax, dword [esp + 0x14]
mov byte [esp + 0x12], 0
test esi, esi
je 0x4e4c40
push 0x5031b4
push esi
call edi
add esp, 8
test eax, eax
jne 0x4e4bfb
mov dword [ebp], 1
jmp 0x4e4c3c
push dword [esp + 0x80]
mov byte [esp + 0x16], 1
push dword [esp + 0x70]
mov dword [ebp], 1
push dword [esp + 0x70]
push dword [esp + 0x80]
push ebx
call fcn.004e35f0
add esp, 0x14
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x4e4c40
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
push 0x50749c
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4c35
push 0x5074a4
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4c35
push 0x5074ac
push esi
call edi
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x4e4c40
mov dword [ebp], 0
jmp 0x4e4c40
mov dword [ebp], 2
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
cmp edx, 0xffffffff
je 0x4e4c56
cmp ecx, 0xffffffff
jne 0x4e4c7b
test edx, edx
je 0x4e4c5a
test ecx, ecx
jne 0x4e4c71
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov byte [esp + 0x64], 0
jmp 0x4e4c87
cmp edx, 0xffffffff
je 0x4e4c82
cmp ecx, 0xffffffff
je 0x4e4c82
mov byte [esp + 0x64], 0
jmp 0x4e4c87
mov byte [esp + 0x64], 1
mov dl, byte [esp + 0x78]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
test dl, dl
je 0x4e4cc0
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [esp + 0x20]
mov ecx, eax
mov dword [esp + 0x1c], eax
xor eax, eax
test ecx, ecx
movzx edx, dl
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], edx
test eax, eax
jne 0x4e4d6d
cmp dword [ebp], 0xffffffff
jle 0x4e4d6d
test dl, dl
jne 0x4e4d6d
cmp byte [esp + 0x64], dl
je 0x4e4ce4
xor ecx, ecx
jmp 0x4e4cec
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
push 0x2010
push ecx
push eax
push dword [ebp]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4e4d1d
cmp byte [esp + 0x64], 0
jne 0x4e4d6d
cmp dword [esp + 0x74], 0
jne 0x4e4d6d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4e4bf1
mov eax, dword [esp + 0x74]
test eax, eax
jle 0x4e4d69
push dword [esp + 0x80]
push dword [esp + 0x70]
push dword [esp + 0x70]
push eax
push ebx
call fcn.004e35f0
add esp, 0x14
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x4e4bf1
mov byte [esp + 0x12], 1
mov dword [ebp], 1
jmp 0x4e4d6d
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
test eax, eax
jne 0x4e4fb5
mov dword [ebp], eax
cmp byte [esp + 0x20], al
jne 0x4e4db7
test esi, esi
je 0x4e4db7
push 0x5074c4
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4dd2
push str.jpeg
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4dd2
push 0x5074d8
push esi
call edi
add esp, 8
test eax, eax
je 0x4e4dd2
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4e4ef3
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
jmp 0x4e4dd6
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4e4ef3
push edi
push edi
push 3
push edi
push 1
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4e4bf1
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x4e4e29
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x4e4e4c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
push 0
lea ecx, [esp + 0x24]
push ecx
push dword [esp + 0x28]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x1c]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x4e4e3b
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4e4e3b
lea ecx, [esp + 0x18]
push ecx
push 0x508414
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov ecx, dword [esp + 0x18]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x1c]
push eax
cmovs ecx, edx
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4e4bf1
mov eax, dword [ecx]
lea edx, [esp + 0x14]
push edx
push ecx
call dword [eax + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4e4fb5
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push edi
call esi
push str.GdiplusShutdown
push edi
mov dword [esp + 0x24], eax
call esi
push str.GdipCreateBitmapFromFile
push edi
mov dword [esp + 0x38], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push edi
mov dword [esp + 0x2c], eax
call esi
push str.GdipDisposeImage
push edi
mov dword [esp + 0x30], eax
call esi
mov esi, eax
mov dword [esp + 0x34], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
test eax, eax
je 0x4e4faa
push 0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x34]
push ecx
call eax
test eax, eax
jne 0x4e4faa
lea eax, [esp + 0x20]
push eax
push ebx
call dword [esp + 0x2c]
test eax, eax
jne 0x4e4fa2
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x28]
call dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
xor edx, edx
push dword [esp + 0x20]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x2c]
call dword [esp + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x64], 0
je 0x4e50c3
cmp dword [ebp], 0
je 0x4e4fde
lea ecx, [esp + 0x34]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x4e50df
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x48]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
mov esi, dword [esp + 0x6c]
cmp esi, 0xffffffff
jne 0x4e5035
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x68]
test eax, eax
je 0x4e5075
movd xmm1, dword [esp + 0x50]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x5045c8]
cvttsd2si esi, xmm1
mov dword [esp + 0x6c], esi
jmp 0x4e5075
mov eax, dword [esp + 0x50]
test eax, eax
je 0x4e5071
movd xmm1, dword [esp + 0x4c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x5045c8]
cvttsd2si edi, xmm1
mov dword [esp + 0x68], edi
jmp 0x4e5075
mov edi, dword [esp + 0x68]
cmp dword [ebp], 0
je 0x4e50bf
push dword [esp + 0x44]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x40]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [esp + 0x12], 0
jne 0x4e50bf
cmp byte [esp + 0x13], 0
jne 0x4e50bf
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push esi
push edi
push dword [ebp]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x18], 0
je 0x4e510f
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
test edx, edx
jne 0x4e50f3
test ecx, ecx
jne 0x4e50f3
lea esi, [edx + 4]
jmp 0x4e50f5
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
xor esi, esi
push esi
push ecx
push edx
push 0
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov ecx, dword [esp + 0x18]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
jmp 0x4e5166
mov ebx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x7c]
test ebx, ebx
jne 0x4e5142
test edx, edx
jne 0x4e5142
cmp byte [esp + 0x70], dl
je 0x4e512d
test ecx, ecx
je 0x4e5149
cmp dword [esp + 0x74], 1
jl 0x4e4bf3
cmp dword [ebp], 1
je 0x4e4bf3
cmp byte [esp + 0x70], 0
je 0x4e5152
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x4e5157
mov ecx, 0xc
push ecx
push edx
push ebx
push dword [ebp]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x74], 0
jle 0x4e51a7
cmp dword [ebp], 0
jne 0x4e51a7
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 1
push eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
call dword [sym.imp.USER32.dll_CreateIconIndirect]
cmp byte [esp + 0x70], 0
mov edi, eax
jne 0x4e519e
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, edi
mov dword [ebp], 1
cmp dword [esp + 0x14], esi
je 0x4e51b8
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x4e51b8
mov byte [eax], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret