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

Disassembly:
mov eax, 0x1005c
call fcn.004c78a0
push ebx
push ebp
mov ebp, dword [esp + 0x10078]
mov ebx, ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], 0
push esi
mov esi, ebx
push edi
mov edi, dword [esp + 0x10074]
mov dword [edi], 0xffffffff
test ebp, ebp
je 0x49ba5a
mov byte [ebp], 0
cmp byte [ebx], 0
je 0x49bbca
push 6
push str.hicon:
push ebx
mov byte [esp + 0x27], 0
mov byte [esp + 0x1f], 0
call fcn.004b2c54
add esp, 0xc
test eax, eax
je 0x49ba95
push 8
push str.hbitmap:
push ebx
call fcn.004b2c54
add esp, 0xc
test eax, eax
jne 0x49bade
mov cl, byte [ebx + 5]
xor ebx, ebx
cmp cl, 0x3a
mov byte [esp + 0x1b], 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 0x49bacb
inc ebx
test ebp, ebp
je 0x49bacb
mov byte [ebp], 1
mov ecx, ebx
call fcn.00404660
mov dword [esp + 0x14], eax
test eax, eax
je 0x49bbca
push 0x2e
push ebx
call fcn.004b4423
mov esi, eax
add esp, 8
test esi, esi
je 0x49baf0
inc esi
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x49bb68
cmp dword [esp + 0x10078], 1
ja 0x49bb92
test esi, esi
je 0x49bb68
push 0x4d6528
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bb92
push 0x4da504
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bb92
push 0x4dc56c
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bb92
push 0x4dc570
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bb92
push 0x4dc574
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bb92
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1a], 0
test esi, esi
je 0x49bc2a
push 0x4da500
push esi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x49bbd7
mov dword [edi], 1
jmp 0x49bc26
push dword [esp + 0x10084]
mov ebp, dword [esp + 0x10074]
mov ecx, ebx
mov edx, dword [esp + 0x1007c]
push ebp
push dword [esp + 0x24]
mov byte [esp + 0x26], 1
mov dword [edi], 1
call fcn.0049c230
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x49bc31
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push 0x4dc578
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bc20
push 0x4dc57c
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bc20
push 0x4dc580
push esi
call fcn.004b218a
mov ebp, dword [esp + 0x10078]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x49bc31
mov dword [edi], 0
jmp 0x49bc31
mov dword [edi], 2
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10070]
mov ecx, dword [esp + 0x1c]
cmp ecx, 0xffffffff
je 0x49bc3f
cmp ebp, 0xffffffff
jne 0x49bc56
test ecx, ecx
je 0x49bc47
test ebp, ebp
jne 0x49bc56
xor ebp, ebp
xor ecx, ecx
mov dword [esp + 0x10070], ebp
mov dword [esp + 0x1c], ecx
cmp ecx, 0xffffffff
je 0x49bc65
mov byte [esp + 0x19], 0
cmp ebp, 0xffffffff
jne 0x49bc6a
mov byte [esp + 0x19], 1
xor edx, edx
mov dword [esp + 0x20], edx
mov dl, byte [esp + 0x1007c]
mov dword [esp + 0x24], edx
test dl, dl
je 0x49bcb2
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [esp + 0x1c]
mov edx, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
movzx eax, al
mov dword [esp + 0x24], eax
xor eax, eax
test edx, edx
mov edx, dword [esp + 0x24]
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], edx
test eax, eax
jne 0x49bd62
cmp dword [edi], 0xffffffff
jle 0x49bd62
test dl, dl
jne 0x49bd62
mov dl, byte [esp + 0x19]
push 0x2010
test dl, dl
cmove eax, ebp
push eax
xor eax, eax
test dl, dl
cmove eax, 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 0x49bd11
cmp byte [esp + 0x19], 0
jne 0x49bd62
cmp dword [esp + 0x10078], 0
jne 0x49bd62
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x49bbca
mov eax, dword [esp + 0x10078]
test eax, eax
jle 0x49bd5e
push dword [esp + 0x10084]
mov edx, eax
mov ecx, ebx
push ebp
push dword [esp + 0x24]
call fcn.0049c230
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x49bbca
mov byte [esp + 0x1a], 1
mov dword [edi], 1
jmp 0x49bd62
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], 0
test eax, eax
jne 0x49bfd6
mov dword [edi], eax
cmp byte [esp + 0x24], al
jne 0x49bdb4
test esi, esi
je 0x49bdb4
push 0x4dc58c
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bdcf
push str.jpeg
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bdcf
push 0x4dc598
push esi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x49bdcf
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x49bef9
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
jmp 0x49bdd3
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x49bef9
push ebp
push ebp
push 3
push ebp
push 1
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x49bbca
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x49be29
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x49be4f
push ebp
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, 0x1005c
ret
push 0
lea ecx, [esp + 0x24]
push ecx
push dword [esp + 0x28]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
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 0x49be3b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x49be3b
lea ecx, [esp + 0x28]
push ecx
push 0x4ca9b0
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov ecx, dword [esp + 0x28]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x24]
push eax
cmovs ecx, edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x49bbca
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 0x49bfd6
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push ebp
call esi
push str.GdiplusShutdown
push ebp
mov dword [esp + 0x2c], eax
call esi
push str.GdipCreateBitmapFromFile
push ebp
mov dword [esp + 0x54], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push ebp
mov dword [esp + 0x48], eax
call esi
push str.GdipDisposeImage
push ebp
mov dword [esp + 0x4c], eax
call esi
mov esi, eax
mov dword [esp + 0x2c], 1
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
test eax, eax
je 0x49bfcb
push 0
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x50]
push ecx
call eax
test eax, eax
jne 0x49bfcb
push 0x8000
lea eax, [esp + 0x6c]
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x6c]
push eax
call dword [esp + 0x48]
test eax, eax
jne 0x49bfc3
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x28]
call dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
xor edx, edx
push dword [esp + 0x20]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x48]
call dword [esp + 0x50]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x19], 0
je 0x49c0fc
cmp dword [edi], 0
je 0x49bffe
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x49c0e5
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x50]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov esi, dword [esp + 0x10070]
cmp esi, 0xffffffff
jne 0x49c054
mov eax, dword [esp + 0x54]
mov ebp, dword [esp + 0x1c]
test eax, eax
je 0x49c094
movd xmm1, dword [esp + 0x58]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, ebp
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4dd168]
cvttsd2si esi, xmm1
jmp 0x49c094
mov eax, dword [esp + 0x58]
test eax, eax
je 0x49c090
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 [0x4dd168]
cvttsd2si ebp, xmm1
mov dword [esp + 0x1c], ebp
jmp 0x49c094
mov ebp, dword [esp + 0x1c]
cmp dword [edi], 0
je 0x49c0df
push dword [esp + 0x3c]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x38]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [esp + 0x1a], 0
jne 0x49c0df
cmp byte [esp + 0x1b], 0
jne 0x49c0df
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push esi
push ebp
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
mov eax, dword [esp + 0x14]
jmp 0x49c103
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
mov esi, dword [esp + 0x10070]
cmp dword [esp + 0x28], 0
je 0x49c13e
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x49c11b
test esi, esi
jne 0x49c11b
lea edx, [ecx + 4]
jmp 0x49c11d
xor edx, edx
push edx
push esi
push ecx
push 0
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov ecx, dword [esp + 0x28]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov ebp, dword [esp + 0x10080]
jmp 0x49c196
mov edx, dword [esp + 0x1c]
mov cl, byte [esp + 0x13]
mov ebp, dword [esp + 0x10080]
test edx, edx
jne 0x49c174
test esi, esi
jne 0x49c174
test cl, cl
je 0x49c15d
test ebp, ebp
je 0x49c174
cmp dword [esp + 0x10078], 1
jl 0x49bbcc
cmp dword [edi], 1
je 0x49bbcc
test cl, cl
je 0x49c183
mov ecx, ebp
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x49c188
mov ecx, 0xc
push ecx
push esi
push edx
push dword [edi]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x10078], 0
jle 0x49c1d8
cmp dword [edi], 0
jne 0x49c1d8
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 1
push eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
call dword [sym.imp.USER32.dll_CreateIconIndirect]
cmp byte [esp + 0x13], 0
mov ebx, eax
jne 0x49c1d0
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, ebx
mov dword [edi], 1
cmp dword [esp + 0x14], esi
je 0x49c1e6
test ebp, ebp
je 0x49c1e6
mov byte [ebp], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret