Function at 0x4d77f0
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x240
mov eax, dword [0x526014]
xor eax, ebp
mov dword [esp + 0x238], eax
mov bl, 1
cmp dword [0x52beb8], 0
je 0x4d7830
mov ecx, dword [esp + 0x238]
xor ecx, ebp
call fcn.004948c8
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [0x52bea8]
test esi, esi
je 0x4d7921
test byte [0x527bc0], 1
je 0x4d7818
xorps xmm0, xmm0
movaps xmmword [esp + 0x10], xmm0
movaps xmmword [esp], xmm0
mov dword [esp + 0x20], 0
cmp byte [esi + 0xb], 0
jns 0x4d7863
mov esi, dword [esi]
mov eax, esp
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4d7898
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0x40000001
sbb eax, 0
jb 0x4d7898
mov eax, dword [0x52bea8]
cmp byte [eax + 0xb], 0
jns 0x4d7891
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [0x52bea8]
cmp byte [eax + 0xb], 0
jns 0x4d78a5
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x511eb0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x52beb8], eax
mov bl, 1
inc eax
cmp eax, 1
ja 0x4d7818
lea esi, [esp + 0x32]
push 0x206
push 0xff
push esi
call fcn.00497b10
add esp, 0xc
mov word [esi - 2], 0
lea esi, [esp + 0x30]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4d791a
cmp eax, 0x104
jbe 0x4d79c3
xor ebx, ebx
jmp 0x4d7818
push 0xc
call fcn.00493d3d
add esp, 4
mov esi, eax
lea edi, [esp + 0x30]
push 0x208
push 0xff
push edi
call fcn.00497b10
add esp, 0xc
push 0x104
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edi, edi
dec edi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov ecx, esi
lea eax, [esp + 0x30]
push eax
call fcn.0043b3a0
movzx eax, byte [esi + 0xb]
test al, al
jns 0x4d7974
mov eax, dword [esi + 4]
mov ecx, esi
push eax
push 0x5c
call fcn.0046ea50
cmp eax, edi
je 0x4d79ac
movzx ecx, byte [esi + 0xb]
mov edx, ecx
test cl, cl
jns 0x4d798f
mov edx, dword [esi + 4]
cmp edx, eax
jbe 0x4d7a73
mov edx, eax
inc edx
test cl, cl
js 0x4d7a58
mov word [esi + eax*2 + 2], 0
mov byte [esi + 0xb], dl
mov ecx, esi
push str.debug.log
call fcn.0046ec10
mov dword [0x52bea8], esi
jmp 0x4d783e
mov ecx, dword [0x52bea8]
push esi
call fcn.004448a0
mov ecx, dword [0x52bea8]
movzx eax, byte [ecx + 0xb]
test al, al
js 0x4d7a69
mov edx, ecx
cmp word [edx + eax*2 - 2], 0x5c
je 0x4d79fb
push 0x50b618
call fcn.0046ec10
mov ecx, dword [0x52bea8]
push str.debug.log
call fcn.0046ec10
mov eax, dword [0x52bea8]
cmp byte [eax + 0xb], 0
jns 0x4d7a12
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x511eb0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x52beb8], eax
inc eax
cmp eax, 1
ja 0x4d7818
mov dword [0x52beb8], 0
jmp 0x4d791a
mov ecx, dword [esi]
mov word [ecx + eax*2 + 2], 0
mov dword [esi + 4], edx
jmp 0x4d79ac
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
jmp 0x4d79e3
mov ecx, esi
call fcn.004d5dd0
int3