Function at 0x49f4e0
Capabilities:
Check if file exists
Get file attributes
Get file size
Link many functions at runtime
Read file on windows

Disassembly:
mov eax, 0x10064
call fcn.004cd3a0
push ebx
push ebp
mov ebp, dword [esp + 0x10080]
mov ebx, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], 0
push esi
mov esi, ebx
push edi
mov edi, dword [esp + 0x1007c]
mov dword [edi], 0xffffffff
test ebp, ebp
je 0x49f51a
mov byte [ebp], 0
cmp byte [ebx], 0
je 0x49f6e1
push 6
push str.hicon:
push ebx
mov byte [esp + 0x2f], 0
mov byte [esp + 0x1f], 0
call fcn.004b653e
add esp, 0xc
test eax, eax
je 0x49f559
push 8
push str.hbitmap:
push ebx
call fcn.004b653e
add esp, 0xc
test eax, eax
jne 0x49f5f5
mov cl, byte [ebx + 5]
xor ebx, ebx
cmp cl, 0x3a
mov byte [esp + 0x23], 1
setne bl
xor eax, eax
lea ebx, [ebx*2 + 6]
add ebx, esi
cmp cl, 0x3a
sete al
mov dword [edi], eax
cmp byte [ebx], 0x2a
sete byte [esp + 0x13]
jne 0x49f58f
inc ebx
test ebp, ebp
je 0x49f58f
mov byte [ebp], 1
mov ecx, ebx
mov al, byte [ecx]
cmp al, 0x20
je 0x49f59b
cmp al, 9
jne 0x49f59e
inc ecx
jmp 0x49f591
test al, al
je 0x49f5e0
cmp al, 0x2d
je 0x49f5aa
cmp al, 0x2b
jne 0x49f5b1
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x49f5e0
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x49f5c0
cmp al, 0x58
jne 0x49f5e0
movsx eax, byte [ecx + 2]
push eax
call fcn.004b99b0
add esp, 4
test eax, eax
je 0x49f5e0
push 0x10
push 0
push ebx
call fcn.004b9a3b
add esp, 0xc
jmp 0x49f5e9
push ebx
call fcn.004b94ac
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x49f6e1
push 0x2e
push ebx
call fcn.004be03b
mov esi, eax
add esp, 8
test esi, esi
je 0x49f607
inc esi
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10078]
test eax, eax
jne 0x49f686
cmp dword [esp + 0x10080], 1
ja 0x49f6b0
test esi, esi
je 0x49f686
push 0x4db610
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f6b0
push 0x4decd8
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f6b0
push 0x4e1010
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f6b0
push 0x4e1014
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f6b0
push 0x4e1018
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f6b0
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1b], 0
test esi, esi
je 0x49f73a
push 0x4decd4
push esi
call fcn.004b626e
add esp, 8
test eax, eax
jne 0x49f6ee
mov dword [edi], 1
jmp 0x49f736
push dword [esp + 0x1008c]
mov edx, dword [esp + 0x10084]
mov ecx, ebx
push ebp
push dword [esp + 0x2c]
mov byte [esp + 0x27], 1
mov dword [edi], 1
call fcn.0049fd30
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x49f73a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
push 0x4e101c
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f730
push 0x4e1020
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f730
push 0x4e1024
push esi
call fcn.004b626e
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x49f73a
mov dword [edi], 0
jmp 0x49f73a
mov dword [edi], 2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x49f74c
cmp ebp, 0xffffffff
jne 0x49f767
test ecx, ecx
je 0x49f750
test ebp, ebp
jne 0x49f75d
xor ebp, ebp
mov byte [esp + 0x1a], 0
mov dword [esp + 0x24], ebp
jmp 0x49f773
cmp ecx, 0xffffffff
je 0x49f76e
cmp ebp, 0xffffffff
je 0x49f76e
mov byte [esp + 0x1a], 0
jmp 0x49f773
mov byte [esp + 0x1a], 1
mov dl, byte [esp + 0x10084]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], edx
test dl, dl
je 0x49f7b1
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edx, dword [esp + 0x28]
mov ecx, eax
xor eax, eax
movzx edx, dl
test ecx, ecx
mov dword [esp + 0x1c], ecx
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], edx
test eax, eax
jne 0x49f861
cmp dword [edi], 0xffffffff
jle 0x49f861
test dl, dl
jne 0x49f861
cmp byte [esp + 0x1a], dl
je 0x49f7d4
xor ecx, ecx
jmp 0x49f7da
mov eax, dword [esp + 0x24]
mov ecx, ebp
push 0x2010
push ecx
push eax
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x49f810
cmp byte [esp + 0x1a], 0
jne 0x49f861
cmp dword [esp + 0x10080], 0
jne 0x49f861
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x49f6e1
mov eax, dword [esp + 0x10080]
test eax, eax
jle 0x49f85d
push dword [esp + 0x1008c]
mov edx, eax
mov ecx, ebx
push ebp
push dword [esp + 0x2c]
call fcn.0049fd30
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x49f6e1
mov byte [esp + 0x1b], 1
mov dword [edi], 1
jmp 0x49f861
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], 0
test eax, eax
jne 0x49faee
mov dword [edi], eax
cmp byte [esp + 0x28], al
jne 0x49f8b3
test esi, esi
je 0x49f8b3
push 0x4e1030
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f8d0
push str.jpeg
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f8d0
push 0x4e103c
push esi
call fcn.004b626e
add esp, 8
test eax, eax
je 0x49f8d0
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x49fa02
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x1c], eax
jmp 0x49f8d4
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x49fa02
push eax
push eax
push 3
push eax
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x49f6e1
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x49f92a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x49f950
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
push 0
lea ecx, [esp + 0x2c]
push ecx
push dword [esp + 0x30]
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 0x49f93c
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x49f93c
lea ecx, [esp + 0x2c]
push ecx
push 0x4d0970
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov ecx, dword [esp + 0x2c]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x1c]
push eax
cmovs ecx, edx
mov dword [esp + 0x30], ecx
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x49f6e1
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 0x49f9f6
mov eax, dword [esp + 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
mov edi, dword [esp + 0x1007c]
jmp 0x49faee
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push eax
call esi
push str.GdiplusShutdown
push dword [esp + 0x20]
mov dword [esp + 0x4c], eax
call esi
push str.GdipCreateBitmapFromFile
push dword [esp + 0x20]
mov dword [esp + 0x5c], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push dword [esp + 0x20]
mov dword [esp + 0x50], eax
call esi
push str.GdipDisposeImage
push dword [esp + 0x20]
mov dword [esp + 0x54], eax
call esi
mov esi, eax
mov dword [esp + 0x30], 1
mov eax, dword [esp + 0x44]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
test eax, eax
je 0x49fae0
push 0
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x58]
push ecx
call eax
test eax, eax
jne 0x49fae0
push 0x8000
lea eax, [esp + 0x74]
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x74]
push eax
call dword [esp + 0x50]
test eax, eax
jne 0x49fad8
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x30]
call dword [esp + 0x58]
mov ecx, dword [esp + 0x14]
xor edx, edx
push dword [esp + 0x28]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x50]
call dword [esp + 0x58]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x1a], 0
je 0x49fbf4
cmp dword [edi], 0
je 0x49fb16
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x49fc0c
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x58]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp ebp, 0xffffffff
jne 0x49fb65
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x24]
test eax, eax
je 0x49fba5
movd xmm1, dword [esp + 0x60]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4e1c08]
cvttsd2si ebp, xmm1
jmp 0x49fba5
mov eax, dword [esp + 0x60]
test eax, eax
je 0x49fba1
movd xmm1, dword [esp + 0x5c]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, ebp
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4e1c08]
cvttsd2si esi, xmm1
mov dword [esp + 0x24], esi
jmp 0x49fba5
mov esi, dword [esp + 0x24]
cmp dword [edi], 0
je 0x49fbf0
push dword [esp + 0x40]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x3c]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [esp + 0x1b], 0
jne 0x49fbf0
cmp byte [esp + 0x23], 0
jne 0x49fbf0
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push ebp
push esi
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x2c], 0
mov edx, dword [esp + 0x24]
je 0x49fc3f
test edx, edx
jne 0x49fc23
test ebp, ebp
jne 0x49fc23
lea ecx, [edx + 4]
jmp 0x49fc25
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
xor ecx, ecx
push ecx
push ebp
push edx
push 0
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov ecx, dword [esp + 0x2c]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
jmp 0x49fc91
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x10088]
test edx, edx
jne 0x49fc71
test ebp, ebp
jne 0x49fc71
test bl, bl
je 0x49fc5a
test ecx, ecx
je 0x49fc75
cmp dword [esp + 0x10080], 1
jl 0x49f6e3
cmp dword [edi], 1
je 0x49f6e3
test bl, bl
je 0x49fc7e
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x49fc83
mov ecx, 0xc
push ecx
push ebp
push edx
push dword [edi]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x10080], 0
jle 0x49fcd3
cmp dword [edi], 0
jne 0x49fcd3
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 1
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_CreateIconIndirect]
cmp byte [esp + 0x13], 0
mov ebx, eax
jne 0x49fccb
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, ebx
mov dword [edi], 1
cmp dword [esp + 0x14], esi
je 0x49fce7
mov eax, dword [esp + 0x10088]
test eax, eax
je 0x49fce7
mov byte [eax], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret