Function at 0x465030
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53dce7
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x1e0]
call sub.libImage.module_public:_bool___thiscall_CxImage::IsValid_void_const
mov edi, str._avatar
test al, al
je 0x4652c7
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [0x5c7000]
add eax, 0x30
push eax
lea eax, [esp + 0x24]
push eax
xor ebx, ebx
mov dword [esp + 0x3c], 0x14
mov dword [esp + 0x40], edi
mov dword [esp + 0x4c], 2
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], ebx
mov eax, dword [eax]
mov ecx, dword [esi + 0x1e0]
push 4
push eax
call sub.libImage.module_public:_bool___thiscall_CxImage::Save_wchar_t_const___unsigned_long_int_
or ebp, 0xffffffff
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov edi, dword [esp + 0x38]
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov eax, dword [0x5c7000]
add eax, 0x30
push eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x50], ebx
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], 1
mov eax, dword [eax]
lea edx, [esp + 0x48]
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
mov edi, eax
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp edi, ebx
je 0x4651a0
cmp dword [esp + 0x68], 0x7800
jbe 0x4651a0
mov ecx, dword [esi + 0x1e0]
push 0x46
call sub.libImage.module_public:_void___thiscall_CxImage::SetJpegQuality_unsigned_char_
mov eax, dword [0x5c7000]
mov edi, dword [esp + 0x38]
add eax, 0x30
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], 2
mov eax, dword [eax]
mov ecx, dword [esi + 0x1e0]
push 3
push eax
call sub.libImage.module_public:_bool___thiscall_CxImage::Save_wchar_t_const___unsigned_long_int_
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ecx, dword [esi + 0x1e0]
push ecx
call fcn.004e3d90
mov ecx, eax
add ecx, 0xc
call sub.libImage.module_public:_class_CxImage____thiscall_CxImage::operator_class_CxImage_const__
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
call sub.mfc90u.dll_CFile::CFile
mov dword [esp + 0x78], 3
mov eax, dword [0x5c7000]
mov edi, dword [esp + 0x38]
add eax, 0x30
push eax
lea edx, [esp + 0x24]
push edx
call fcn.0040f2b0
add esp, 8
mov byte [esp + 0x78], 4
mov eax, dword [eax]
push ebx
push 0x2000
push eax
lea ecx, [esp + 0x30]
call sub.mfc90u.dll_CFile::Open
mov esi, eax
mov byte [esp + 0x78], 3
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp esi, ebx
je 0x46528c
lea ecx, [esp + 0x24]
call sub.mfc90u.dll_CFile::GetLength
mov esi, eax
lea eax, [esi + 1]
push eax
call sub.mfc90u.dll_new__
add esp, 4
mov edi, eax
push esi
push edi
lea ecx, [esp + 0x2c]
call sub.mfc90u.dll_CFile::Read
lea ecx, [esp + 0x24]
call sub.mfc90u.dll_CFile::Close
lea ecx, [esp + 0x1c]
push ecx
push esi
push edi
call dword [sym.imp.libCryptoWtw.module_int___cdecl_wtwCryptoHashSHA1_char_const___int__wchar_t___]
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push esi
push edi
call dword [sym.imp.libCryptoWtw.module_int___cdecl_wtwCryptoHashMD5_char_const___int__wchar_t___]
add esp, 0xc
push edi
call sub.mfc90u.dll_delete__
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add esp, 4
lea edx, [esp + 0x34]
push edx
push str.WTW_OnAvatarChanged
xor ebx, ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ecx
call fcn.004add50
mov eax, dword [esp + 0x18]
push eax
call sub.mfc90u.dll_delete__
mov ecx, dword [esp + 0x20]
add esp, 4
push ecx
call sub.mfc90u.dll_delete__
add esp, 4
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x24]
call fcn.00531e54
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x5c7000]
add eax, 0x30
push eax
lea edx, [esp + 0x24]
push edx
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], 5
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
or ebp, 0xffffffff
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push str.WTW_OnAvatarChanged
xor ebx, ebx
mov dword [esp + 0x3c], 0x14
mov dword [esp + 0x4c], 1
call fcn.004add50
call fcn.004e3d90
push eax
lea ecx, [esp + 0x24]
push ecx
mov edi, str.userThemedefaultAvatar.png
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], 6
push eax
call fcn.004e3d90
mov ecx, eax
add ecx, 0x1d4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
call fcn.004e3d90
mov ecx, dword [eax + 0x1d4]
push 4
push ecx
lea ecx, [eax + 0xc]
call sub.libImage.module_public:_bool___thiscall_CxImage::Load_wchar_t_const___unsigned_long_int_
test al, al
jne 0x465439
mov eax, dword [0x5c7000]
add eax, 0x10
push eax
lea edx, [esp + 0x24]
push edx
mov edi, str.ComponentsThemedefaultAvatar.png
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x78], 7
push eax
call fcn.004e3d90
mov ecx, eax
add ecx, 0x1d4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov dword [esp + 0x78], ebp
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
call fcn.004e3d90
mov ecx, dword [eax + 0x1d4]
push 4
push ecx
lea ecx, [eax + 0xc]
call sub.libImage.module_public:_bool___thiscall_CxImage::Load_wchar_t_const___unsigned_long_int_
test al, al
jne 0x465439
push str.NULL
call fcn.004e3d90
mov ecx, eax
add ecx, 0x1d4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
push 0x56d164
push 0x65
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push ebx
push 4
push eax
call fcn.004e3d90
mov ecx, eax
add ecx, 0xc
call sub.libImage.module_public:_bool___thiscall_CxImage::LoadResource_struct_HRSRC_____unsigned_long_int__struct_HINSTANCE____
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret