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

Disassembly:
sub esp, 0x264
push ebx
mov ebx, dword [esp + 0x270]
push ebp
push esi
mov esi, dword [esp + 0x284]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 0
mov dword [ebx], 0xffffffff
push edi
mov edi, ecx
test esi, esi
je 0x472b93
mov byte [esi], 0
cmp byte [edi], 0
je 0x472d02
push 6
push str.hicon:
push edi
mov byte [esp + 0x27], 0
mov byte [esp + 0x1f], 0
call fcn.00484c8d
add esp, 0xc
test eax, eax
je 0x472bce
push 8
push str.hbitmap:
push edi
call fcn.00484c8d
add esp, 0xc
test eax, eax
jne 0x472c16
cmp byte [edi + 5], 0x3a
jne 0x472bdf
mov dword [ebx], 1
add edi, 6
jmp 0x472be8
mov dword [ebx], 0
add edi, 8
cmp byte [edi], 0x2a
mov byte [esp + 0x1b], 1
sete al
mov byte [esp + 0x13], al
test al, al
je 0x472c03
inc edi
test esi, esi
je 0x472c03
mov byte [esi], 1
mov ecx, edi
call fcn.004133c0
mov dword [esp + 0x14], eax
test eax, eax
je 0x472d02
push 0x2e
push edi
call fcn.0048695e
mov esi, eax
add esp, 8
test esi, esi
je 0x472c28
inc esi
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x472ca0
cmp dword [esp + 0x280], 1
ja 0x472cca
test esi, esi
je 0x472ca0
push 0x4a1f54
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472cca
push 0x4a1f58
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472cca
push 0x4a3e70
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472cca
push 0x4a3e74
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472cca
push 0x4a3e78
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472cca
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1a], 0
test esi, esi
je 0x472d62
push 0x4a1f50
push esi
call fcn.00484212
add esp, 8
test eax, eax
jne 0x472d0f
mov dword [ebx], 1
jmp 0x472d5e
push dword [esp + 0x28c]
mov ebp, dword [esp + 0x27c]
mov ecx, edi
mov edx, dword [esp + 0x284]
push ebp
push dword [esp + 0x24]
mov byte [esp + 0x26], 1
mov dword [ebx], 1
call fcn.00473350
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x472d69
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
push 0x4a3e7c
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472d58
push 0x4a3e80
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472d58
push 0x4a3e84
push esi
call fcn.00484212
mov ebp, dword [esp + 0x280]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x472d69
mov dword [ebx], 0
jmp 0x472d69
mov dword [ebx], 2
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x278]
mov ecx, dword [esp + 0x1c]
cmp ecx, 0xffffffff
je 0x472d77
cmp ebp, 0xffffffff
jne 0x472d7f
test ecx, ecx
je 0x472d90
test ebp, ebp
je 0x472d90
cmp ecx, 0xffffffff
je 0x472d89
cmp ebp, 0xffffffff
jne 0x472d9d
mov byte [esp + 0x19], 1
jmp 0x472da2
xor ebp, ebp
mov dword [esp + 0x278], ebp
mov dword [esp + 0x1c], ebp
mov byte [esp + 0x19], 0
mov dl, byte [esp + 0x284]
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
test dl, dl
je 0x472dde
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edx, dword [esp + 0x24]
mov ecx, eax
mov dword [esp + 0x20], eax
xor eax, eax
test ecx, ecx
movzx edx, dl
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], edx
test eax, eax
jne 0x472e8e
cmp dword [ebx], 0xffffffff
jle 0x472e8e
test dl, dl
jne 0x472e8e
cmp byte [esp + 0x19], dl
je 0x472e01
xor ecx, ecx
jmp 0x472e07
mov eax, dword [esp + 0x1c]
mov ecx, ebp
push 0x2010
push ecx
push eax
push dword [ebx]
push edi
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x472e3d
cmp byte [esp + 0x19], 0
jne 0x472e8e
cmp dword [esp + 0x280], 0
jne 0x472e8e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x472d02
mov eax, dword [esp + 0x280]
test eax, eax
jle 0x472e8a
push dword [esp + 0x28c]
mov edx, eax
mov ecx, edi
push ebp
push dword [esp + 0x24]
call fcn.00473350
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x472d02
mov byte [esp + 0x1a], 1
mov dword [ebx], 1
jmp 0x472e8e
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], 0
test eax, eax
jne 0x473101
mov dword [ebx], eax
cmp byte [esp + 0x24], al
jne 0x472ee0
test esi, esi
je 0x472ee0
push 0x4a3e90
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472efb
push str.jpeg
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472efb
push 0x4a3e9c
push esi
call fcn.00484212
add esp, 8
test eax, eax
je 0x472efb
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x473024
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
jmp 0x472eff
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x473024
push ebp
push ebp
push 3
push ebp
push ebp
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x472d02
push 0
push ebp
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 0x472f54
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x472f7a
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, 0x264
ret
push 0
lea ecx, [esp + 0x28]
push ecx
push dword [esp + 0x2c]
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 + 0x20]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x472f66
mov eax, dword [esp + 0x20]
test eax, eax
je 0x472f66
lea ecx, [esp + 0x28]
push ecx
push 0x497820
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 + 0x20]
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 0x472d02
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 0x473101
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, 0x264
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push ebp
call esi
push str.GdiplusShutdown
push ebp
mov dword [esp + 0x28], eax
call esi
push str.GdipCreateBitmapFromFile
push ebp
mov dword [esp + 0x54], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push ebp
mov dword [esp + 0x50], 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 + 0x20]
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
test eax, eax
je 0x4730f6
push 0
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x48]
push ecx
call eax
test eax, eax
jne 0x4730f6
push 0x104
lea eax, [esp + 0x6c]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x6c]
push eax
call dword [esp + 0x50]
test eax, eax
jne 0x4730ee
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
call dword [esp + 0x50]
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 + 0x40]
call dword [esp + 0x50]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x19], 0
je 0x473227
cmp dword [ebx], 0
je 0x473129
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x473210
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 + 0x278]
cmp esi, 0xffffffff
jne 0x47317f
mov eax, dword [esp + 0x54]
mov ebp, dword [esp + 0x1c]
test eax, eax
je 0x4731bf
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 [0x4a4238]
cvttsd2si esi, xmm1
jmp 0x4731bf
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4731bb
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 [0x4a4238]
cvttsd2si ebp, xmm1
mov dword [esp + 0x1c], ebp
jmp 0x4731bf
mov ebp, dword [esp + 0x1c]
cmp dword [ebx], 0
je 0x47320a
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 0x47320a
cmp byte [esp + 0x1b], 0
jne 0x47320a
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push esi
push ebp
push dword [ebx]
push edi
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
mov eax, dword [esp + 0x14]
jmp 0x47322e
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
mov esi, dword [esp + 0x278]
cmp dword [esp + 0x28], 0
je 0x473269
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x473246
test esi, esi
jne 0x473246
lea edx, [ecx + 4]
jmp 0x473248
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 + 0x288]
jmp 0x4732b9
mov edx, dword [esp + 0x1c]
mov cl, byte [esp + 0x13]
mov ebp, dword [esp + 0x288]
test edx, edx
jne 0x473297
test esi, esi
jne 0x473297
test cl, cl
je 0x473288
test ebp, ebp
je 0x473297
cmp dword [esp + 0x280], 1
jl 0x47330b
cmp dword [ebx], 1
je 0x47330b
test cl, cl
je 0x4732a6
mov ecx, ebp
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x4732ab
mov ecx, 0xc
push ecx
push esi
push edx
push dword [ebx]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x280], 0
jle 0x4732fb
cmp dword [ebx], 0
jne 0x4732fb
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 edi, eax
jne 0x4732f3
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, edi
mov dword [ebx], 1
cmp dword [esp + 0x14], esi
je 0x473309
test ebp, ebp
je 0x473309
mov byte [ebp], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret