Function at 0x4bc7fe
Capabilities:
Check if file exists
Delete file

Disassembly:
push 0x118
mov eax, 0x5f2989
call fcn.0059bbd7
mov esi, ecx
lea edx, [esi + 0x44]
xor ebx, ebx
cmp dword [edx + 0x10], ebx
je 0x4bcbc9
mov eax, dword [esi + 0xb4]
cmp eax, dword [esi + 0xb8]
je 0x4bcbc9
sub esp, 0x18
mov ecx, esp
push edx
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
call fcn.00404267
lea ecx, [ebp - 0x40]
call fcn.00435b82
mov ecx, esp
mov dword [ebp - 4], ebx
lea eax, [esi + 0x9c]
push eax
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
call fcn.00404267
lea ecx, [ebp - 0x28]
call fcn.00435b82
add esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmovae eax, dword [ebp - 0x28]
push eax
call edi
test eax, eax
je 0x4bc898
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.image_png
lea ecx, [ebp - 0x58]
call fcn.0040b0d5
mov byte [ebp - 4], 2
mov eax, dword [esi + 0x98]
cmp eax, 1
jne 0x4bc8cf
push str.image_png
call fcn.005c2f90
pop ecx
push eax
push str.image_png
lea ecx, [ebp - 0x58]
call fcn.0040b566
jmp 0x4bc8ec
cmp eax, 2
jne 0x4bc8ec
mov ebx, str.image_jpeg
push ebx
call fcn.005c2f90
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x58]
call fcn.0040b566
xor ebx, ebx
cmp dword [ebp - 0x44], 8
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x68]
cmovae ecx, dword [ebp - 0x58]
call fcn.004bc714
test eax, eax
js 0x4bcbb1
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call edi
test eax, eax
je 0x4bcbb1
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x100]
lea eax, [ebp - 0x40]
mov dword [ebp - method.Gdiplus::Image.virtual_0], vtable.Gdiplus::Image.0
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
mov dword [ebp - 0x100], ebx
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromFile]
mov dword [ebp - 0xfc], eax
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xf4], ebx
push eax
push dword [ebp - 0x100]
call dword [sym.imp.gdiplus.dll_GdipGetImageWidth]
mov ecx, dword [ebp - 0xfc]
test eax, eax
mov dword [ebp - 0xf0], ebx
cmovne ecx, eax
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0x100]
mov dword [ebp - 0xfc], ecx
call dword [sym.imp.gdiplus.dll_GdipGetImageHeight]
mov ecx, dword [ebp - 0xfc]
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0xf0]
mov dword [ebp - 0xfc], ecx
lea ecx, [ebp - 0x124]
push dword [ebp - 0xf4]
call fcn.004bc6db
push 8
mov byte [ebp - 4], 4
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x4bc9f0
lea eax, [ebp - 0xec]
mov dword [ebp - 0xec], ebx
push eax
push dword [ebp - 0x120]
call dword [sym.imp.gdiplus.dll_GdipGetImageGraphicsContext]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xec]
mov dword [edi], eax
jmp 0x4bc9f2
mov edi, ebx
test edi, edi
je 0x4bcb8f
push ecx
mov ecx, edi
call fcn.004bc608
push dword [ebp - 0xf0]
lea eax, [ebp - 0x104]
mov ecx, edi
push dword [ebp - 0xf4]
push ebx
push ebx
push eax
call fcn.004bc624
mov eax, dword [esi + 0xb8]
mov ebx, dword [esi + 0xb4]
mov dword [ebp - 0xf0], eax
cmp ebx, eax
je 0x4bcb62
push ebx
lea ecx, [ebp - 0xd0]
call fcn.004894fc
mov byte [ebp - 4], 5
lea eax, [ebp - 0x98]
cmp dword [ebp - 0x84], 0x10
cmovae eax, dword [ebp - 0x98]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4bcb44
xor esi, esi
lea eax, [ebp - 0x98]
push esi
sub esp, 0x18
mov ecx, esp
push eax
mov dword [ecx + 0x10], esi
mov dword [ecx + 0x14], esi
call fcn.00404267
lea ecx, [ebp - 0xe8]
call fcn.00435b82
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x4bca9b
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x114]
call fcn.004bc65d
lea ecx, [ebp - 0xe8]
call fcn.0040b67e
lea eax, [ebp - 0xec]
mov dword [ebp - 0xec], esi
push eax
push dword [ebp - 0x110]
call dword [sym.imp.gdiplus.dll_GdipGetImageHeight]
mov ecx, dword [ebp - 0x10c]
test eax, eax
mov esi, dword [ebp - 0xec]
cmovne ecx, eax
and dword [ebp - 0xf4], 0
lea eax, [ebp - 0xf4]
mov dword [ebp - 0x10c], ecx
push eax
push dword [ebp - 0x110]
call dword [sym.imp.gdiplus.dll_GdipGetImageWidth]
mov ecx, dword [ebp - 0x10c]
test eax, eax
push esi
push dword [ebp - 0xf4]
cmovne ecx, eax
lea eax, [ebp - 0x114]
push dword [ebp - 0xcc]
mov dword [ebp - 0x10c], ecx
mov ecx, edi
push dword [ebp - 0xd0]
push eax
call fcn.004bc624
push dword [ebp - 0x110]
mov dword [ebp - method.Gdiplus::Image.virtual_0], vtable.Gdiplus::Image.0
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 4
call fcn.0048b79d
add ebx, 0x68
cmp ebx, dword [ebp - 0xf0]
jne 0x4bca38
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x68]
push 0
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x120]
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 - 0x120]
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
push dword [ebp - 0x100]
mov dword [ebp - method.Gdiplus::Image.virtual_0], vtable.Gdiplus::Image.0
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea ecx, [ebp - 0x58]
call fcn.0040b67e
lea ecx, [ebp - 0x28]
call fcn.0040b67e
lea ecx, [ebp - 0x40]
call fcn.0040b67e
xor eax, eax
call fcn.0059bb81
ret