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

Disassembly:
push 0x118
mov eax, 0x5e7e1c
call fcn.00592017
mov esi, ecx
lea edx, [esi + 0x44]
xor ebx, ebx
cmp dword [edx + 0x10], ebx
je 0x4b3b93
mov eax, dword [esi + 0xb4]
cmp eax, dword [esi + 0xb8]
je 0x4b3b93
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.00430aaf
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.00430aaf
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 0x4b3862
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 0x4b3899
push str.image_png
call fcn.005b93d0
pop ecx
push eax
push str.image_png
lea ecx, [ebp - 0x58]
call fcn.0040b566
jmp 0x4b38b6
cmp eax, 2
jne 0x4b38b6
mov ebx, str.image_jpeg
push ebx
call fcn.005b93d0
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.004b36de
test eax, eax
js 0x4b3b7b
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call edi
test eax, eax
je 0x4b3b7b
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.004b36a5
push 8
mov byte [ebp - 4], 4
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x4b39ba
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 0x4b39bc
mov edi, ebx
test edi, edi
je 0x4b3b59
push ecx
mov ecx, edi
call fcn.004b35d2
push dword [ebp - 0xf0]
lea eax, [ebp - 0x104]
mov ecx, edi
push dword [ebp - 0xf4]
push ebx
push ebx
push eax
call fcn.004b35ee
mov eax, dword [esi + 0xb8]
mov ebx, dword [esi + 0xb4]
mov dword [ebp - 0xf0], eax
cmp ebx, eax
je 0x4b3b2c
push ebx
lea ecx, [ebp - 0xd0]
call fcn.0048263f
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 0x4b3b0e
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.00430aaf
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x4b3a65
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x114]
call fcn.004b3627
lea ecx, [ebp - 0xe8]
call fcn.0040b67b
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.004b35ee
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.004848e0
add ebx, 0x68
cmp ebx, dword [ebp - 0xf0]
jne 0x4b3a02
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.0040b67b
lea ecx, [ebp - 0x28]
call fcn.0040b67b
lea ecx, [ebp - 0x40]
call fcn.0040b67b
xor eax, eax
call fcn.00591fc1
ret