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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov ebp, dword [esp + 0x60]
push esi
mov esi, dword [esp + 0x68]
push edi
mov edi, dword [esp + 0x60]
mov dword [esi], 0xffffffff
cmp word [edi], 0
mov dword [esp + 0x14], 0
je 0x4749b3
push 0x2e
push edi
call fcn.0048dfe4
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x47490f
add ebx, 2
cmp dword [esp + 0x70], 1
ja 0x47498b
test ebx, ebx
je 0x474974
push 0x4a88a0
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x47498b
push 0x4a88a8
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x47498b
push 0x4bbcf0
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x47498b
push 0x4bbcf8
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x47498b
push 0x4bbd00
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x47498b
cmp dword [esp + 0x70], 0
mov byte [esp + 0x13], 0
jle 0x4749bd
mov dword [esi], 1
jmp 0x474a1b
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x70]
push ebp
push eax
push ecx
push edi
mov byte [esp + 0x23], 1
mov dword [esi], 1
call fcn.00474f00
add esp, 0x10
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x474a1f
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
test ebx, ebx
je 0x474a1b
push 0x4a8898
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
jne 0x4749db
mov dword [esi], 1
jmp 0x474a1b
push 0x4bbd08
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x474a15
push 0x4bbd10
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x474a15
push 0x4bbd18
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
jne 0x474a1b
mov dword [esi], eax
jmp 0x474a1b
mov dword [esi], 2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x64]
cmp ecx, 0xffffffff
je 0x474a2d
cmp ebp, 0xffffffff
jne 0x474a46
test ecx, ecx
je 0x474a35
test ebp, ebp
jne 0x474a46
xor ebp, ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x64], ebp
mov byte [esp + 0x12], 0
jmp 0x474a5c
cmp ecx, 0xffffffff
je 0x474a57
cmp ebp, 0xffffffff
je 0x474a57
mov byte [esp + 0x12], 0
jmp 0x474a5c
mov byte [esp + 0x12], 1
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor edi, edi
cmp byte [esp + 0x74], 0
je 0x474a81
push str.gdiplus
call esi
mov edi, eax
mov eax, dword [esp + 0x14]
test edi, edi
jne 0x474a81
mov byte [esp + 0x74], 0
test eax, eax
jne 0x474b29
mov edx, dword [esp + 0x6c]
mov edx, dword [edx]
cmp edx, 0xffffffff
jle 0x474b29
cmp byte [esp + 0x74], al
jne 0x474b29
cmp byte [esp + 0x12], al
je 0x474aac
xor ecx, ecx
jmp 0x474ab2
mov eax, dword [esp + 0x64]
mov ecx, ebp
push 0x2010
push ecx
push eax
mov eax, dword [esp + 0x6c]
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x14], eax
test eax, eax
je 0x474ade
cmp byte [esp + 0x12], 0
jne 0x474b29
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov ecx, dword [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4749b3
cmp dword [esp + 0x70], 0
jle 0x474b25
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x60]
push ebp
push edx
push eax
push ecx
call fcn.00474f00
add esp, 0x10
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x4749b3
mov byte [esp + 0x13], 1
jmp 0x474b29
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
test eax, eax
jne 0x474c49
mov edx, dword [esp + 0x6c]
mov dword [edx], eax
cmp byte [esp + 0x74], al
jne 0x474b7f
test ebx, ebx
je 0x474b7f
push 0x4bbd30
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x474b8c
push str.jpeg
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x474b8c
push 0x4bbd44
push ebx
call fcn.0048c519
add esp, 8
test eax, eax
je 0x474b8c
test edi, edi
jne 0x474b94
push str.gdiplus
call esi
mov edi, eax
test edi, edi
je 0x474cff
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push edi
call esi
push str.GdiplusShutdown
push edi
mov ebp, eax
call esi
push str.GdipCreateBitmapFromFile
push edi
mov dword [esp + 0x30], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push edi
mov ebx, eax
call esi
push str.GdipDisposeImage
push edi
mov dword [esp + 0x28], eax
call esi
mov esi, eax
xor eax, eax
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
cmp ebp, eax
je 0x474c3a
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
call ebp
test eax, eax
jne 0x474c3a
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x1c]
push edx
push eax
call ebx
test eax, eax
jne 0x474c31
mov edx, dword [esp + 0x1c]
push 0xff000000
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [esp + 0x2c]
test eax, eax
je 0x474c2a
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x1c]
push eax
call esi
mov ecx, dword [esp + 0x24]
push ecx
call dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x68]
cmp byte [esp + 0x12], 0
mov ebx, dword [esp + 0x6c]
je 0x474e63
cmp dword [ebx], 0
je 0x474c75
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x474e48
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x40]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
cmp ebp, 0xffffffff
jne 0x474e1f
cmp dword [esp + 0x44], 0
je 0x474cac
fild dword [esp + 0x48]
fidiv dword [esp + 0x44]
fimul dword [esp + 0x64]
fadd qword [0x4bc190]
call fcn.0049ae30
mov ebp, eax
mov edi, dword [esp + 0x64]
cmp dword [ebx], 0
je 0x474e5d
mov eax, dword [esp + 0x3c]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
mov ecx, dword [esp + 0x38]
push ecx
call esi
cmp byte [esp + 0x13], 0
jne 0x474e5d
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.USER32.dll_DestroyIcon]
mov eax, dword [ebx]
mov ecx, dword [esp + 0x60]
push 0x10
push ebp
push edi
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov edx, dword [esp + 0x60]
push 0
push 0
push 3
push 0
push 0
push SysReAllocString
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4749b3
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x474d51
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x474d74
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, 0x4c
ret
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
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 + 0x20]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x474d63
mov eax, dword [esp + 0x20]
test eax, eax
je 0x474d63
lea ecx, [esp + 0x18]
push ecx
push 0x49d7c0
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
test eax, eax
jns 0x474dd1
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4749b3
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x474c49
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
cmp dword [esp + 0x48], 0
je 0x474cac
fild dword [esp + 0x44]
fidiv dword [esp + 0x48]
fimul dword [esp + 0x68]
fadd qword [0x4bc190]
call fcn.0049ae30
mov edi, eax
jmp 0x474cb0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov eax, dword [esp + 0x14]
jmp 0x474e67
mov edi, dword [esp + 0x64]
cmp dword [esp + 0x18], 0
je 0x474ea1
test edi, edi
jne 0x474e7b
test ebp, ebp
jne 0x474e7b
lea ecx, [edi + 4]
jmp 0x474e7d
xor ecx, ecx
push ecx
push ebp
push edi
push 0
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
test edi, edi
jne 0x474ea9
test ebp, ebp
je 0x474eb9
mov ecx, dword [ebx]
push 0xc
push ebp
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret