Function at 0x4af4c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f5cf0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x52b360]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4af500
sub eax, edx
sar eax, 1
push eax
push edi
lea esi, [ebx + 0xe4]
call fcn.00401760
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4af531
push 0x510b0c
jmp 0x4af630
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
je 0x4af62b
mov eax, dword [ebp + 0xc]
lea esi, [edi + 4]
push esi
push eax
mov dword [edi], vtable.Gdiplus::Image.0
mov dword [esi], 0
call sub.gdiplus.dll_GdipLoadImageFromFile
lea edx, [esp + 0x1c]
mov dword [edi + 8], eax
mov eax, dword [esi]
push edx
push eax
mov dword [esp + 0x24], 0
call sub.gdiplus.dll_GdipGetImageWidth
test eax, eax
je 0x4af57e
mov dword [edi + 8], eax
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x1c]
mov dword [ebx + 0x11c], ecx
mov eax, dword [esi]
push edx
push eax
mov dword [esp + 0x24], 0
call sub.gdiplus.dll_GdipGetImageHeight
test eax, eax
je 0x4af5a4
mov dword [edi + 8], eax
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.USER32.dll_SetRect]
push 0x7e
push 0xcc
push 0
push 0
lea edx, [esp + 0x7c]
push edx
mov dword [ebx + 0x120], ecx
call esi
mov eax, dword [ebx + 0x120]
mov ecx, dword [ebx + 0x11c]
push eax
push ecx
push 0
push 0
lea edx, [esp + 0x6c]
push edx
call esi
lea eax, [esp + 0x5c]
lea edi, [esp + 0x6c]
lea esi, [esp + 0x4c]
call fcn.00458070
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
sub esi, dword [esp + 0x4c]
sub edi, dword [esp + 0x50]
push 0x10
mov dword [esp + 0x2c], esi
mov dword [esp + 0x48], edi
call sub.gdiplus.dll_GdipAlloc
test eax, eax
je 0x4af6bc
mov edx, esi
mov ecx, edi
mov esi, eax
call fcn.00401f90
mov dword [esp + 0x1c], eax
jmp 0x4af6c8
push 0x510b18
mov ecx, ebx
call fcn.004af340
mov ecx, dword [ebx + 0xe0]
test ecx, ecx
je 0x4af649
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
lea ecx, [esp + 0x44]
lea edi, [ebx + 0x100]
push ecx
mov dword [ebx + 0xe0], 0
call fcn.00403de0
mov edx, dword [eax + 4]
mov esi, dword [eax]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x54], edx
call fcn.00403f30
mov ecx, dword [esp + 0x50]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push esi
push edx
push eax
lea ecx, [esp + 0x5c]
push ecx
push edi
call fcn.00440580
xor eax, eax
mov dword [ebx + 0x120], eax
mov dword [ebx + 0x11c], eax
mov dword [ebx + 0x124], eax
xor al, al
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x18], ecx
test eax, eax
je 0x4af6e8
mov edx, dword [eax + 4]
lea ecx, [esp + 0x18]
push ecx
push edx
call sub.gdiplus.dll_GdipGetImageGraphicsContext
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], ecx
push 2
push ecx
mov dword [esp + 0x90], 0
call sub.gdiplus.dll_GdipSetInterpolationMode
test eax, eax
je 0x4af707
mov dword [esp + 0x50], eax
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x20]
add esi, 4
push eax
push ecx
mov dword [esp + 0x28], 0
call sub.gdiplus.dll_GdipGetImageHeight
test eax, eax
je 0x4af72f
mov edx, dword [esp + 0x14]
mov dword [edx + 8], eax
mov ecx, dword [esi]
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x2c], 0
call sub.gdiplus.dll_GdipGetImageWidth
test eax, eax
je 0x4af753
mov edx, dword [esp + 0x14]
mov dword [edx + 8], eax
fild dword [esp + 0x28]
push 0
push 0
push 0
fstp dword [esp + 0x3c]
push 2
fild dword [esp + 0x54]
mov dword [esp + 0x54], edi
fstp dword [esp + 0x44]
fild dword [esp + 0x54]
test edi, edi
jge 0x4af77d
fadd dword [0x51266c]
mov eax, dword [esp + 0x34]
sub esp, 0x20
fstp dword [esp + 0x1c]
fild dword [esp + 0x54]
test eax, eax
jge 0x4af796
fadd dword [0x51266c]
mov ecx, dword [esi]
fstp dword [esp + 0x18]
fldz
mov edi, dword [esp + 0x48]
fst dword [esp + 0x14]
fst dword [esp + 0x10]
fld dword [esp + 0x64]
fstp dword [esp + 0xc]
fld dword [esp + 0x60]
fstp dword [esp + 8]
fst dword [esp + 4]
fstp dword [esp]
push ecx
push edi
call sub.gdiplus.dll_GdipDrawImageRectRect
test eax, eax
je 0x4af7d0
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [ebx + 0xe0]
test ecx, ecx
je 0x4af7ee
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0xe0], ecx
mov ecx, dword [ebx + 0x128]
test ecx, ecx
je 0x4af814
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [ebx + 0x128], 0
mov esi, dword [ebp + 0xc]
sub esp, 0x1c
mov edx, esi
mov eax, esp
mov dword [esp + 0x60], esp
call fcn.00403c00
lea ecx, [esp + 0x44]
push ecx
call fcn.00492d80
add esp, 0x20
push 0xffffffffffffffff
push 0
push eax
lea eax, [ebx + 0x100]
mov byte [esp + 0x94], 1
call fcn.00401850
mov byte [esp + 0x88], 0
cmp dword [esp + 0x40], 8
jb 0x4af868
mov edx, dword [esp + 0x2c]
push edx
call fcn.004c8f17
add esp, 4
sub esp, 0x1c
mov edx, esi
mov eax, esp
mov dword [esp + 0x60], esp
call fcn.00403c00
call fcn.00493230
add esp, 0x1c
push edi
mov dword [ebx + 0x124], eax
call sub.gdiplus.dll_GdipDeleteGraphics
mov al, 1
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8