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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
push ebx
mov ebx, ecx
push esi
mov esi, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [edi], 0xffffffff
test eax, eax
je 0x482edf
mov byte [eax], 0
cmp word [ebx], 0
je 0x483046
push 6
push str.HICON:
push ebx
mov byte [esp + 0x1f], 0
mov byte [esp + 0x1d], 0
call fcn.0049f9c2
add esp, 0xc
test eax, eax
je 0x482f1b
push 8
push str.HBITMAP:
push ebx
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x482f6c
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, esi
cmp ecx, 0x3a
sete al
mov dword [edi], eax
movzx eax, word [ebx]
cmp eax, 0x2a
sete byte [esp + 0x11]
jne 0x482f59
mov eax, dword [ebp + 0x18]
add ebx, 2
test eax, eax
je 0x482f59
mov byte [eax], 1
mov ecx, ebx
call fcn.00481e40
mov dword [esp + 0x14], eax
test eax, eax
je 0x483046
push 0x2e
push ebx
call fcn.0049d32e
mov esi, eax
add esp, 8
test esi, esi
je 0x482f80
add esi, 2
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x482ff4
cmp dword [ebp + 0x10], 1
ja 0x48301b
test esi, esi
je 0x482ff4
push 0x4d5048
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48301b
push 0x4d5050
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48301b
push 0x4dc464
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48301b
push 0x4dc46c
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48301b
push 0x4dc474
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48301b
mov eax, dword [esp + 0x14]
mov byte [esp + 0x12], 0
test esi, esi
je 0x48309b
push 0x4d5040
push esi
call fcn.0049f841
add esp, 8
test eax, eax
jne 0x48304f
mov dword [edi], 1
jmp 0x483097
push dword [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 8]
mov byte [esp + 0x1a], 1
push dword [esp + 0x24]
mov dword [edi], 1
call fcn.00483650
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x48309b
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x4dc47c
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x483091
push 0x4dc484
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x483091
push 0x4dc48c
push esi
call fcn.0049f841
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x48309b
mov dword [edi], 0
jmp 0x48309b
mov dword [edi], 2
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
cmp edx, 0xffffffff
je 0x4830b0
cmp ecx, 0xffffffff
jne 0x4830d4
test edx, edx
je 0x4830b4
test ecx, ecx
jne 0x4830ca
mov dword [ebp + 8], 0
mov dword [esp + 0x1c], 0
mov byte [esp + 0x10], 0
jmp 0x4830e0
cmp edx, 0xffffffff
je 0x4830db
cmp ecx, 0xffffffff
je 0x4830db
mov byte [esp + 0x10], 0
jmp 0x4830e0
mov byte [esp + 0x10], 1
mov dl, byte [ebp + 0x14]
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], edx
test dl, dl
je 0x48311a
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [esp + 0x24]
mov ecx, eax
xor eax, eax
movzx edx, dl
test ecx, ecx
mov dword [esp + 0x18], ecx
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], edx
test eax, eax
jne 0x4831bc
cmp dword [edi], 0xffffffff
jle 0x4831bc
test dl, dl
jne 0x4831bc
cmp byte [esp + 0x10], dl
je 0x48313d
xor ecx, ecx
jmp 0x483144
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
push 0x2010
push ecx
push eax
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x14], eax
test eax, eax
je 0x483171
cmp byte [esp + 0x10], 0
jne 0x4831bc
cmp dword [ebp + 0x10], 0
je 0x483048
jmp 0x4831bc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x483046
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4831b8
push dword [ebp + 0x1c]
mov edx, eax
mov ecx, ebx
push dword [ebp + 8]
push dword [esp + 0x24]
call fcn.00483650
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x483046
mov byte [esp + 0x12], 1
mov dword [edi], 1
jmp 0x4831bc
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0
test eax, eax
jne 0x48341e
mov dword [edi], eax
cmp byte [esp + 0x24], al
jne 0x48320e
test esi, esi
je 0x48320e
push 0x4dc4a4
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48322b
push str.jpeg
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48322b
push 0x4dc4b8
push esi
call fcn.0049f841
add esp, 8
test eax, eax
je 0x48322b
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x48334d
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x18], eax
jmp 0x48322f
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x48334d
push eax
push eax
push 3
push eax
push 1
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x483046
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x483281
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x4832a3
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 ebx
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [esp + 0x28]
push ecx
push dword [esp + 0x2c]
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 + 0x18]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x483293
mov eax, dword [esp + 0x18]
test eax, eax
je 0x483293
lea ecx, [esp + 0x20]
push ecx
push 0x4b8904
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov ecx, dword [esp + 0x20]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x18]
push eax
cmovs ecx, edx
mov dword [esp + 0x24], ecx
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x483046
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 0x483345
mov eax, dword [esp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
jmp 0x48341e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push eax
call esi
push str.GdiplusShutdown
push dword [esp + 0x1c]
mov dword [esp + 0x30], eax
call esi
push str.GdipCreateBitmapFromFile
push dword [esp + 0x1c]
mov dword [esp + 0x40], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push dword [esp + 0x1c]
mov dword [esp + 0x34], eax
call esi
push str.GdipDisposeImage
push dword [esp + 0x1c]
mov dword [esp + 0x38], eax
call esi
mov esi, eax
mov dword [esp + 0x3c], 1
mov eax, dword [esp + 0x28]
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
test eax, eax
je 0x483410
push 0
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x3c]
push ecx
call eax
test eax, eax
jne 0x483410
lea eax, [esp + 0x24]
push eax
push ebx
call dword [esp + 0x34]
test eax, eax
jne 0x483408
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
call dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
xor edx, edx
push dword [esp + 0x24]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x34]
call dword [esp + 0x3c]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x10], 0
je 0x483521
cmp dword [edi], 0
je 0x483446
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x48353c
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x50]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
mov esi, dword [ebp + 8]
cmp esi, 0xffffffff
jne 0x483499
mov eax, dword [esp + 0x54]
test eax, eax
je 0x4834d3
movd xmm1, dword [esp + 0x58]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, dword [esp + 0x1c]
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4dc9e8]
cvttsd2si esi, xmm1
mov dword [ebp + 8], esi
jmp 0x4834d3
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4834d3
movd xmm1, dword [esp + 0x54]
movd xmm0, eax
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4dc9e8]
cvttsd2si eax, xmm1
mov dword [esp + 0x1c], eax
cmp dword [edi], 0
je 0x48351d
push dword [esp + 0x4c]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x48]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [esp + 0x12], 0
jne 0x48351d
cmp byte [esp + 0x13], 0
jne 0x48351d
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push esi
push dword [esp + 0x24]
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x20], 0
je 0x48356b
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
test edx, edx
jne 0x48354f
test ecx, ecx
jne 0x48354f
lea esi, [edx + 4]
jmp 0x483551
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
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 + 0x20]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
jmp 0x4835bd
mov ebx, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
test ebx, ebx
jne 0x48359a
test edx, edx
jne 0x48359a
cmp byte [esp + 0x11], dl
je 0x483587
test ecx, ecx
je 0x4835a1
cmp dword [ebp + 0x10], 1
jl 0x483048
cmp dword [edi], 1
je 0x483048
cmp byte [esp + 0x11], 0
je 0x4835aa
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x4835af
mov ecx, 0xc
push ecx
push edx
push ebx
push dword [edi]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [ebp + 0x10], 0
jle 0x4835fb
cmp dword [edi], 0
jne 0x4835fb
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 1
push eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
call dword [sym.imp.USER32.dll_CreateIconIndirect]
cmp byte [esp + 0x11], 0
mov ebx, eax
jne 0x4835f3
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, ebx
mov dword [edi], 1
cmp dword [esp + 0x14], esi
je 0x48360b
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x48360b
mov byte [eax], 0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret