Function at 0x4b52d2
Capabilities:
Check if file exists

Disassembly:
push 0xf0
mov eax, 0x5e9c3d
call fcn.00593b07
mov dword [ebp - 0xec], edx
mov esi, ecx
cmp dword [esi + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc8], ebx
je 0x4b560f
mov eax, dword [ebx]
cmp eax, dword [ebx + 4]
je 0x4b560f
mov edi, str.image_png
lea ecx, [ebp - 0x28]
push edi
call fcn.0040b0d5
and dword [ebp - 4], 0
cmp dword [ebp + 8], 1
je 0x4b532a
cmp dword [ebp + 8], 2
jne 0x4b533b
mov edi, str.image_jpeg
push edi
call fcn.005baec0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x28]
call fcn.0040b566
push 8
pop edi
cmp dword [ebp - 0x14], edi
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x38]
cmovae ecx, dword [ebp - 0x28]
call fcn.004b4e15
test eax, eax
js 0x4b5607
mov eax, esi
cmp dword [esi + 0x14], edi
jb 0x4b5361
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4b5607
cmp dword [esi + 0x14], edi
jb 0x4b5377
mov esi, dword [esi]
and dword [ebp - 0xd4], 0
lea eax, [ebp - 0xd4]
push eax
push esi
mov dword [ebp - 0xd8], vtable.Gdiplus::Image.0
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromFile]
mov dword [ebp - 0xd0], eax
lea eax, [ebp - 0xbc]
xor esi, esi
push eax
push dword [ebp - 0xd4]
mov dword [ebp - 0xbc], esi
call dword [sym.imp.gdiplus.dll_GdipGetImageWidth]
mov ecx, dword [ebp - 0xd0]
test eax, eax
mov dword [ebp - 0xc4], esi
cmovne ecx, eax
lea eax, [ebp - 0xc4]
push eax
push dword [ebp - 0xd4]
mov dword [ebp - 0xd0], ecx
call dword [sym.imp.gdiplus.dll_GdipGetImageHeight]
mov ecx, dword [ebp - 0xd0]
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0xc4]
mov dword [ebp - 0xd0], ecx
lea ecx, [ebp - 0xfc]
push dword [ebp - 0xbc]
call fcn.004b4ddc
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x4b5441
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xc0], esi
push eax
push dword [ebp - 0xf8]
call dword [sym.imp.gdiplus.dll_GdipGetImageGraphicsContext]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xc0]
mov dword [edi], eax
jmp 0x4b5443
mov edi, esi
test edi, edi
je 0x4b55e5
push ecx
mov ecx, edi
call fcn.004b4d09
push dword [ebp - 0xc4]
lea eax, [ebp - 0xd8]
mov ecx, edi
push dword [ebp - 0xbc]
push esi
push esi
push eax
call fcn.004b4d25
mov eax, dword [ebp - 0xc8]
mov ebx, dword [ebx]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc8], eax
cmp ebx, eax
je 0x4b55b6
push ebx
lea ecx, [ebp - 0xa0]
call fcn.004831cb
mov byte [ebp - 4], 3
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x54], 0x10
cmovae eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4b54c2
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 2
call fcn.0048546c
jmp 0x4b55a7
push esi
sub esp, 0x18
lea eax, [ebp - 0x68]
mov ecx, esp
push eax
mov dword [ecx + 0x10], esi
mov dword [ecx + 0x14], esi
call fcn.00404267
lea ecx, [ebp - 0xb8]
call fcn.00430ab2
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x4b54ed
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0xe8]
call fcn.004b4d5e
lea ecx, [ebp - 0xb8]
call fcn.0040b67e
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xc0], esi
push eax
push dword [ebp - 0xe4]
call dword [sym.imp.gdiplus.dll_GdipGetImageHeight]
mov ecx, dword [ebp - 0xe0]
test eax, eax
mov esi, dword [ebp - 0xc0]
cmovne ecx, eax
and dword [ebp - 0xbc], 0
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xe0], ecx
push eax
push dword [ebp - 0xe4]
call dword [sym.imp.gdiplus.dll_GdipGetImageWidth]
mov ecx, dword [ebp - 0xe0]
test eax, eax
push esi
push dword [ebp - 0xbc]
cmovne ecx, eax
lea eax, [ebp - 0xe8]
push dword [ebp - 0x9c]
mov dword [ebp - 0xe0], ecx
mov ecx, edi
push dword [ebp - 0xa0]
push eax
call fcn.004b4d25
push dword [ebp - 0xe4]
mov dword [ebp - 0xe8], vtable.Gdiplus::Image.0
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 2
call fcn.0048546c
xor esi, esi
add ebx, 0x68
cmp ebx, dword [ebp - 0xc8]
jne 0x4b5488
mov eax, dword [ebp - 0xec]
cmp dword [eax + 0x14], 8
jb 0x4b55c4
mov eax, dword [eax]
push esi
lea ecx, [ebp - 0x38]
push ecx
push eax
push dword [ebp - 0xf8]
call dword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
push dword [edi]
call dword [sym.imp.gdiplus.dll_GdipDeleteGraphics]
push edi
call dword [sym.imp.gdiplus.dll_GdipFree]
push dword [ebp - 0xf8]
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
push dword [ebp - 0xd4]
mov dword [ebp - 0xd8], vtable.Gdiplus::Image.0
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea ecx, [ebp - 0x28]
call fcn.0040b67e
xor eax, eax
call fcn.00593ab1
ret