Function at 0x402540
Capabilities:
Delete directory
Delete file
Get common file path

Disassembly:
sub esp, 0x324
mov eax, dword [str.Tally_ees_6.3]
mov edx, dword [0x411648]
mov ecx, dword [0x411644]
mov dword [esp + 8], eax
mov ax, word [0x41164c]
mov dword [esp + 0x10], edx
mov word [esp + 0x14], ax
mov eax, dword [esp + 0x32c]
lea edx, [esp + 0x220]
mov dword [esp + 0xc], ecx
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402580
mov eax, str.Tally63.exe
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402591
push esi
push edi
lea edi, [esp + 0x228]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4025a4
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x228]
push ecx
call fcn.00405c10
add esp, 4
test eax, eax
je 0x402911
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
cmp eax, 0x80004005
jne 0x402615
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x334]
push 0x41165c
push 0x411674
push str.Error___Unable_to_allocate_memory
push eax
call fcn.00405e30
add esp, 0x14
pop edi
pop esi
add esp, 0x324
ret
mov eax, dword [0x4151e8]
cmp eax, 1
push ebx
push ebp
mov ebp, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
jne 0x402634
lea ecx, [esp + 0x10]
push ecx
push 2
push 0
call ebp
jmp 0x40264a
cmp eax, 2
jne 0x402646
lea edx, [esp + 0x10]
push edx
push 0x17
push 0
call ebp
jmp 0x40264a
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40267f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x33c]
push 0x4116b8
push 0x4116d4
push str.Error___Could_not_get_Folder_Location
push eax
call fcn.00405e30
add esp, 0x14
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x324
ret
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
jne 0x4026ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x33c]
push 0x41171c
push 0x411730
push str.Error___Could_not_get_Folder_Details
push eax
call fcn.00405e30
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
add esp, 0x14
push eax
call dword [ecx + 8]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x324
ret
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
call dword [edx + 8]
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026f0
sub eax, edx
cmp byte [esp + eax + 0x27], 0x5c
je 0x40272d
mov eax, 0x411778
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402707
lea edi, [esp + 0x28]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402715
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x18]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402733
lea edi, [esp + 0x28]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402741
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
jmp 0x402760
mov cl, byte [esp + eax + 0x28]
mov byte [esp + eax + 0x12c], cl
inc eax
test cl, cl
jne 0x402760
mov eax, 0x41177c
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402777
lea edi, [esp + 0x12c]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402788
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x12c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0x230]
push ecx
call ebx
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x28]
mov byte [esp + eax + 0x12c], cl
inc eax
test cl, cl
jne 0x4027c0
mov eax, str.TallyReference.lnk
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4027d7
lea edi, [esp + 0x12c]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4027e8
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x12c]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov eax, dword [0x4151e8]
cmp eax, 1
jne 0x402826
lea ecx, [esp + 0x10]
push ecx
push 0
jmp 0x402832
cmp eax, 2
jne 0x40286b
lea edx, [esp + 0x10]
push edx
push 0x19
push 0
call ebp
test eax, eax
je 0x40286b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x33c]
push str.SHGetSpecialFolderLocation
push 0x4117bc
push str.Error___Unable_to_create_shortcut_on_the_desktop
push eax
call fcn.00405e30
add esp, 0x14
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x324
ret
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
jne 0x4028ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x33c]
push 0x411810
push str.RemoveOldShellGroupAndShortcut
push 0x411844
push eax
call fcn.00405e30
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
add esp, 0x14
push eax
call dword [ecx + 8]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x324
ret
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, str.Tally_6.3.lnk
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4028e0
lea edi, [esp + 0x28]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4028f0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x324
ret