Function at 0x4bcbd1
Capabilities:
Check if file exists

Disassembly:
push 0xf0
mov eax, 0x5f29da
call fcn.0059bbd7
mov dword [ebp - 0xec], edx
mov esi, ecx
cmp dword [esi + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc8], ebx
je 0x4bcf0e
mov eax, dword [ebx]
cmp eax, dword [ebx + 4]
je 0x4bcf0e
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 0x4bcc29
cmp dword [ebp + 8], 2
jne 0x4bcc3a
mov edi, str.image_jpeg
push edi
call fcn.005c2f90
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.004bc714
test eax, eax
js 0x4bcf06
mov eax, esi
cmp dword [esi + 0x14], edi
jb 0x4bcc60
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4bcf06
cmp dword [esi + 0x14], edi
jb 0x4bcc76
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.004bc6db
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x4bcd40
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 0x4bcd42
mov edi, esi
test edi, edi
je 0x4bcee4
push ecx
mov ecx, edi
call fcn.004bc608
push dword [ebp - 0xc4]
lea eax, [ebp - 0xd8]
mov ecx, edi
push dword [ebp - 0xbc]
push esi
push esi
push eax
call fcn.004bc624
mov eax, dword [ebp - 0xc8]
mov ebx, dword [ebx]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc8], eax
cmp ebx, eax
je 0x4bceb5
push ebx
lea ecx, [ebp - 0xa0]
call fcn.004894fc
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 0x4bcdc1
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 2
call fcn.0048b79d
jmp 0x4bcea6
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.00435b82
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x4bcdec
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0xe8]
call fcn.004bc65d
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.004bc624
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.0048b79d
xor esi, esi
add ebx, 0x68
cmp ebx, dword [ebp - 0xc8]
jne 0x4bcd87
mov eax, dword [ebp - 0xec]
cmp dword [eax + 0x14], 8
jb 0x4bcec3
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.0059bb81
ret