Function at 0x4ace70
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.004db810
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 0x4aceaa
mov byte [ebp], 0
cmp byte [ebx], 0
je 0x4ad071
push 6
push str.hicon:
push ebx
mov byte [esp + 0x2f], 0
mov byte [esp + 0x1f], 0
call fcn.004c4e4b
add esp, 0xc
test eax, eax
je 0x4acee9
push 8
push str.hbitmap:
push ebx
call fcn.004c4e4b
add esp, 0xc
test eax, eax
jne 0x4acf85
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 0x4acf1f
inc ebx
test ebp, ebp
je 0x4acf1f
mov byte [ebp], 1
mov ecx, ebx
mov al, byte [ecx]
cmp al, 0x20
je 0x4acf2b
cmp al, 9
jne 0x4acf2e
inc ecx
jmp 0x4acf21
test al, al
je 0x4acf70
cmp al, 0x2d
je 0x4acf3a
cmp al, 0x2b
jne 0x4acf41
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x4acf70
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x4acf50
cmp al, 0x58
jne 0x4acf70
movsx eax, byte [ecx + 2]
push eax
call fcn.004c4410
add esp, 4
test eax, eax
je 0x4acf70
push 0x10
push 0
push ebx
call fcn.004c4c8d
add esp, 0xc
jmp 0x4acf79
push ebx
call fcn.004c4db1
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4ad071
push 0x2e
push ebx
call fcn.004c7059
mov esi, eax
add esp, 8
test esi, esi
je 0x4acf97
inc esi
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10078]
test eax, eax
jne 0x4ad016
cmp dword [esp + 0x10080], 1
ja 0x4ad040
test esi, esi
je 0x4ad016
push 0x4ea7c0
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad040
push 0x4ee78c
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad040
push 0x4f07ec
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad040
push 0x4f07f0
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad040
push 0x4f07f4
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad040
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1b], 0
test esi, esi
je 0x4ad0ca
push 0x4ee788
push esi
call fcn.004c408e
add esp, 8
test eax, eax
jne 0x4ad07e
mov dword [edi], 1
jmp 0x4ad0c6
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.004ad6c0
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x4ad0ca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret
push 0x4f07f8
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad0c0
push 0x4f07fc
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad0c0
push 0x4f0800
push esi
call fcn.004c408e
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x4ad0ca
mov dword [edi], 0
jmp 0x4ad0ca
mov dword [edi], 2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x4ad0dc
cmp ebp, 0xffffffff
jne 0x4ad0f7
test ecx, ecx
je 0x4ad0e0
test ebp, ebp
jne 0x4ad0ed
xor ebp, ebp
mov byte [esp + 0x1a], 0
mov dword [esp + 0x24], ebp
jmp 0x4ad103
cmp ecx, 0xffffffff
je 0x4ad0fe
cmp ebp, 0xffffffff
je 0x4ad0fe
mov byte [esp + 0x1a], 0
jmp 0x4ad103
mov byte [esp + 0x1a], 1
mov dl, byte [esp + 0x10084]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], edx
test dl, dl
je 0x4ad141
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 0x4ad1f1
cmp dword [edi], 0xffffffff
jle 0x4ad1f1
test dl, dl
jne 0x4ad1f1
cmp byte [esp + 0x1a], dl
je 0x4ad164
xor ecx, ecx
jmp 0x4ad16a
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 0x4ad1a0
cmp byte [esp + 0x1a], 0
jne 0x4ad1f1
cmp dword [esp + 0x10080], 0
jne 0x4ad1f1
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 0x4ad071
mov eax, dword [esp + 0x10080]
test eax, eax
jle 0x4ad1ed
push dword [esp + 0x1008c]
mov edx, eax
mov ecx, ebx
push ebp
push dword [esp + 0x2c]
call fcn.004ad6c0
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x4ad071
mov byte [esp + 0x1b], 1
mov dword [edi], 1
jmp 0x4ad1f1
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], 0
test eax, eax
jne 0x4ad47e
mov dword [edi], eax
cmp byte [esp + 0x28], al
jne 0x4ad243
test esi, esi
je 0x4ad243
push 0x4f080c
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad260
push str.jpeg
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad260
push 0x4f0818
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x4ad260
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4ad392
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x1c], eax
jmp 0x4ad264
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4ad392
push eax
push eax
push 3
push eax
push 1
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ad071
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 0x4ad2ba
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 0x4ad2e0
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 0x4ad2cc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4ad2cc
lea ecx, [esp + 0x2c]
push ecx
push 0x4de9c0
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 0x4ad071
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 0x4ad386
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 0x4ad47e
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 0x4ad470
push 0
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x58]
push ecx
call eax
test eax, eax
jne 0x4ad470
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 0x4ad468
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 0x4ad584
cmp dword [edi], 0
je 0x4ad4a6
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x4ad59c
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 0x4ad4f5
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x24]
test eax, eax
je 0x4ad535
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 [0x4f13e8]
cvttsd2si ebp, xmm1
jmp 0x4ad535
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4ad531
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 [0x4f13e8]
cvttsd2si esi, xmm1
mov dword [esp + 0x24], esi
jmp 0x4ad535
mov esi, dword [esp + 0x24]
cmp dword [edi], 0
je 0x4ad580
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 0x4ad580
cmp byte [esp + 0x23], 0
jne 0x4ad580
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 0x4ad5cf
test edx, edx
jne 0x4ad5b3
test ebp, ebp
jne 0x4ad5b3
lea ecx, [edx + 4]
jmp 0x4ad5b5
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 0x4ad621
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x10088]
test edx, edx
jne 0x4ad601
test ebp, ebp
jne 0x4ad601
test bl, bl
je 0x4ad5ea
test ecx, ecx
je 0x4ad605
cmp dword [esp + 0x10080], 1
jl 0x4ad073
cmp dword [edi], 1
je 0x4ad073
test bl, bl
je 0x4ad60e
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x4ad613
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 0x4ad663
cmp dword [edi], 0
jne 0x4ad663
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 0x4ad65b
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, ebx
mov dword [edi], 1
cmp dword [esp + 0x14], esi
je 0x4ad677
mov eax, dword [esp + 0x10088]
test eax, eax
je 0x4ad677
mov byte [eax], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10064
ret