Function at 0x4b3b9b
Capabilities:
Check if file exists

Disassembly:
push 0xf0
mov eax, 0x5e7e6d
call fcn.00592017
mov dword [ebp - 0xec], edx
mov esi, ecx
cmp dword [esi + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc8], ebx
je 0x4b3ed8
mov eax, dword [ebx]
cmp eax, dword [ebx + 4]
je 0x4b3ed8
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 0x4b3bf3
cmp dword [ebp + 8], 2
jne 0x4b3c04
mov edi, str.image_jpeg
push edi
call fcn.005b93d0
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.004b36de
test eax, eax
js 0x4b3ed0
mov eax, esi
cmp dword [esi + 0x14], edi
jb 0x4b3c2a
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4b3ed0
cmp dword [esi + 0x14], edi
jb 0x4b3c40
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.004b36a5
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x4b3d0a
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 0x4b3d0c
mov edi, esi
test edi, edi
je 0x4b3eae
push ecx
mov ecx, edi
call fcn.004b35d2
push dword [ebp - 0xc4]
lea eax, [ebp - 0xd8]
mov ecx, edi
push dword [ebp - 0xbc]
push esi
push esi
push eax
call fcn.004b35ee
mov eax, dword [ebp - 0xc8]
mov ebx, dword [ebx]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc8], eax
cmp ebx, eax
je 0x4b3e7f
push ebx
lea ecx, [ebp - 0xa0]
call fcn.0048263f
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 0x4b3d8b
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 2
call fcn.004848e0
jmp 0x4b3e70
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.00430aaf
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x4b3db6
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0xe8]
call fcn.004b3627
lea ecx, [ebp - 0xb8]
call fcn.0040b67b
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.004b35ee
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.004848e0
xor esi, esi
add ebx, 0x68
cmp ebx, dword [ebp - 0xc8]
jne 0x4b3d51
mov eax, dword [ebp - 0xec]
cmp dword [eax + 0x14], 8
jb 0x4b3e8d
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.0040b67b
xor eax, eax
call fcn.00591fc1
ret