Function at 0x483b50
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, 0x5c
push ebx
push ebp
mov ebp, dword [esp + 0x6c]
mov ebx, ecx
push esi
push edi
mov edi, dword [esp + 0x80]
mov esi, ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [ebp], 0xffffffff
test edi, edi
je 0x483b80
mov byte [edi], 0
cmp word [ebx], 0
je 0x483cf5
push 6
push str.HICON:
push ebx
mov byte [esp + 0x23], 0
mov byte [esp + 0x80], 0
call fcn.0049f8ef
add esp, 0xc
test eax, eax
je 0x483bbf
push 8
push str.HBITMAP:
push ebx
call fcn.0049f8ef
add esp, 0xc
test eax, eax
jne 0x483c0e
movzx ecx, word [ebx + 0xa]
xor ebx, ebx
cmp ecx, 0x3a
mov byte [esp + 0x17], 1
setne bl
xor eax, eax
lea ebx, [ebx*4 + 0xc]
add ebx, esi
cmp ecx, 0x3a
sete al
mov dword [ebp], eax
movzx eax, word [ebx]
cmp eax, 0x2a
sete byte [esp + 0x74]
jne 0x483bfb
add ebx, 2
test edi, edi
je 0x483bfb
mov byte [edi], 1
mov ecx, ebx
call fcn.004828e0
mov dword [esp + 0x18], eax
test eax, eax
je 0x483cf5
push 0x2e
push ebx
call fcn.0049d21e
mov esi, eax
add esp, 8
test esi, esi
je 0x483c22
add esi, 2
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x483c97
cmp dword [esp + 0x78], 1
ja 0x483cc2
test esi, esi
je 0x483c97
push 0x4dbb00
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483cc2
push 0x4dbb08
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483cc2
push 0x4df534
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483cc2
push 0x4df53c
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483cc2
push 0x4df544
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483cc2
mov eax, dword [esp + 0x18]
mov byte [esp + 0x16], 0
test esi, esi
je 0x483d51
push 0x4dbaf8
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
jne 0x483cff
mov dword [ebp], 1
jmp 0x483d4d
push dword [esp + 0x84]
mov edi, dword [esp + 0x74]
mov ecx, ebx
mov edx, dword [esp + 0x7c]
push edi
push dword [esp + 0x24]
mov byte [esp + 0x22], 1
mov dword [ebp], 1
call fcn.00484310
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, 2
jae 0x483d55
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
push 0x4df54c
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483d46
push 0x4df554
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483d46
push 0x4df55c
push esi
call fcn.0049f76e
mov edi, dword [esp + 0x78]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x18]
jne 0x483d55
mov dword [ebp], 0
jmp 0x483d55
mov dword [ebp], 2
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x1c]
cmp ecx, 0xffffffff
je 0x483d67
cmp edi, 0xffffffff
jne 0x483d86
test ecx, ecx
je 0x483d6b
test edi, edi
jne 0x483d7c
xor edi, edi
mov byte [esp + 0x15], 0
mov dword [esp + 0x70], edi
mov dword [esp + 0x1c], edi
jmp 0x483d92
cmp ecx, 0xffffffff
je 0x483d8d
cmp edi, 0xffffffff
je 0x483d8d
mov byte [esp + 0x15], 0
jmp 0x483d92
mov byte [esp + 0x15], 1
mov dl, byte [esp + 0x7c]
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
test dl, dl
je 0x483dcb
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [esp + 0x28]
mov ecx, eax
mov dword [esp + 0x24], eax
xor eax, eax
test ecx, ecx
movzx edx, dl
cmove edx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], edx
test eax, eax
jne 0x483e73
cmp dword [ebp], 0xffffffff
jle 0x483e73
test dl, dl
jne 0x483e73
cmp byte [esp + 0x15], dl
je 0x483def
xor ecx, ecx
jmp 0x483df5
mov eax, dword [esp + 0x1c]
mov ecx, edi
push 0x2010
push ecx
push eax
push dword [ebp]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x483e24
cmp byte [esp + 0x15], 0
jne 0x483e73
cmp dword [esp + 0x78], 0
je 0x483cf7
jmp 0x483e73
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x483cf5
mov eax, dword [esp + 0x78]
test eax, eax
jle 0x483e6f
push dword [esp + 0x84]
mov edx, eax
mov ecx, ebx
push edi
push dword [esp + 0x24]
call fcn.00484310
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, 2
jb 0x483cf5
mov byte [esp + 0x16], 1
mov dword [ebp], 1
jmp 0x483e73
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], 0
test eax, eax
jne 0x4840c4
mov dword [ebp], eax
cmp byte [esp + 0x28], al
jne 0x483ec6
test esi, esi
je 0x483ec6
push 0x4df574
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483ee1
push str.jpeg
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483ee1
push 0x4df588
push esi
call fcn.0049f76e
add esp, 8
test eax, eax
je 0x483ee1
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x484002
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
jmp 0x483ee5
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x484002
push edi
push edi
push 3
push edi
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x483cf5
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 0x483f38
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x483f5b
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, 0x5c
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 + 0x24]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x483f4a
mov eax, dword [esp + 0x24]
test eax, eax
je 0x483f4a
lea ecx, [esp + 0x20]
push ecx
push 0x4bb904
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 + 0x24]
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 0x483cf5
mov eax, dword [ecx]
lea edx, [esp + 0x18]
push edx
push ecx
call dword [eax + 0xc]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4840c4
mov eax, dword [esp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push edi
call esi
push str.GdiplusShutdown
push edi
mov dword [esp + 0x2c], eax
call esi
push str.GdipCreateBitmapFromFile
push edi
mov dword [esp + 0x40], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push edi
mov dword [esp + 0x34], eax
call esi
push str.GdipDisposeImage
push edi
mov dword [esp + 0x38], eax
call esi
mov esi, eax
mov dword [esp + 0x3c], 1
mov eax, dword [esp + 0x24]
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
test eax, eax
je 0x4840b9
push 0
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x3c]
push ecx
call eax
test eax, eax
jne 0x4840b9
lea eax, [esp + 0x28]
push eax
push ebx
call dword [esp + 0x34]
test eax, eax
jne 0x4840b1
push 0xff000000
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x30]
call dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
xor edx, edx
push dword [esp + 0x28]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x1c], ecx
call esi
push dword [esp + 0x34]
call dword [esp + 0x3c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x18]
cmp byte [esp + 0x15], 0
je 0x4841e4
cmp dword [ebp], 0
je 0x4840ed
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x4841d0
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 [esp + 0x70]
cmp esi, 0xffffffff
jne 0x484140
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x1c]
test eax, eax
je 0x484180
movd xmm1, dword [esp + 0x58]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4dfac0]
cvttsd2si esi, xmm1
jmp 0x484180
mov eax, dword [esp + 0x58]
test eax, eax
je 0x48417c
movd xmm1, dword [esp + 0x54]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4dfac0]
cvttsd2si edi, xmm1
mov dword [esp + 0x1c], edi
jmp 0x484180
mov edi, dword [esp + 0x1c]
cmp dword [ebp], 0
je 0x4841ca
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 + 0x16], 0
jne 0x4841ca
cmp byte [esp + 0x17], 0
jne 0x4841ca
push dword [esp + 0x18]
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, 0x5c
ret
mov eax, dword [esp + 0x18]
jmp 0x4841e8
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov esi, dword [esp + 0x70]
cmp dword [esp + 0x20], 0
je 0x484223
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x484200
test esi, esi
jne 0x484200
lea edx, [ecx + 4]
jmp 0x484202
xor edx, edx
push edx
push esi
push ecx
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]
mov ebx, dword [esp + 0x80]
jmp 0x48427a
mov edx, dword [esp + 0x1c]
mov cl, byte [esp + 0x74]
mov ebx, dword [esp + 0x80]
test edx, edx
jne 0x484257
test esi, esi
jne 0x484257
test cl, cl
je 0x484242
test ebx, ebx
je 0x48425b
cmp dword [esp + 0x78], 1
jl 0x483cf7
cmp dword [ebp], 1
je 0x483cf7
test cl, cl
je 0x484266
mov ecx, ebx
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x48426b
mov ecx, 0xc
push ecx
push esi
push edx
push dword [ebp]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x78], 0
jle 0x4842bb
cmp dword [ebp], 0
jne 0x4842bb
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 + 0x74], 0
mov edi, eax
jne 0x4842b2
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, edi
mov dword [ebp], 1
cmp dword [esp + 0x18], esi
je 0x4842c8
test ebx, ebx
je 0x4842c8
mov byte [ebx], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret