Function at 0x506fac
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x6a7f0e
call fcn.00640244
sub esp, 0x60
push ebx
mov ebx, dword [ebp + 0x18]
test bl, bl
push esi
push edi
sete al
movzx eax, al
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x3c]
push dword [ebp + 0x10]
push eax
call fcn.00460227
and dword [ebp - 4], 0
lea eax, [ebp - 0x54]
push ebx
push dword [ebp + 8]
push dword [ebp + 0x14]
push eax
call fcn.00460227
xor edi, edi
mov dword [ebp - 0x10], 7
and dword [ebp - 0x14], edi
xor eax, eax
mov dword [ebp + 0x18], edi
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 0x3c]
xor esi, esi
inc esi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x28], 8
mov dword [ebp + 0x14], esi
jae 0x507016
lea eax, [ebp - 0x3c]
push eax
call fcn.00461054
test al, al
jne 0x507073
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x6c]
push dword [ebp + 0x10]
push eax
call fcn.00460227
push eax
lea ecx, [ebp - 0x3c]
call fcn.00427c6d
push 0
push 1
lea ecx, [ebp - 0x6c]
call fcn.004281f2
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00438e88
test eax, eax
je 0x507132
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x507065
lea eax, [ebp - 0x3c]
push eax
call fcn.00461054
test al, al
je 0x507132
mov edi, dword [ebp + 8]
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x507082
lea eax, [ebp - 0x3c]
push esi
push eax
lea eax, [ebp - 0x6c]
push str._s._d
push eax
call fcn.004654e1
add esp, 0x10
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0042823e
push 0
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.004281f2
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x5070c2
lea eax, [ebp - 0x24]
push eax
call fcn.00461054
test al, al
jne 0x507102
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x5070d8
lea eax, [ebp - 0x24]
cmp dword [edi + 0x14], 8
jb 0x5070e2
mov ebx, dword [edi]
jmp 0x5070e4
mov ebx, edi
push eax
call fcn.0046047f
push ebx
mov esi, eax
call fcn.0046047f
push esi
push eax
call fcn.00665a8e
pop ecx
pop ecx
test eax, eax
jne 0x50710b
mov esi, dword [ebp + 0x14]
inc esi
mov dword [ebp + 0x14], esi
jmp 0x507076
mov ecx, dword [ebp - 0x24]
push 8
pop esi
cmp dword [ebp - 0x10], esi
jae 0x507119
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x507124
lea eax, [ebp - 0x3c]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
push ecx
push eax
call ebx
test eax, eax
jne 0x507139
xor edi, edi
jmp 0x507283
cmp byte [ebp + 0x1c], 0
je 0x507191
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x50714a
lea eax, [ebp - 0x54]
push eax
call fcn.00461054
test al, al
je 0x507191
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x50715f
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x507191
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x507175
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x10], esi
jae 0x507180
lea eax, [ebp - 0x24]
push ecx
push eax
call ebx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
jmp 0x507283
mov ebx, dword [ebp - 0x54]
mov eax, ebx
cmp dword [ebp - 0x40], esi
jae 0x50719e
lea eax, [ebp - 0x54]
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov edx, ecx
cmp esi, 8
jae 0x5071ae
lea edx, [ebp - 0x3c]
mov di, word [edx]
cmp di, word [eax]
mov edi, dword [ebp + 0x18]
jne 0x5071df
cmp word [edx], di
je 0x5071db
mov di, word [edx + 2]
cmp di, word [eax + 2]
mov word [ebp + 0x1e], di
mov edi, dword [ebp + 0x18]
jne 0x5071df
add edx, 4
add eax, 4
cmp word [ebp + 0x1e], di
jne 0x5071ae
xor eax, eax
jmp 0x5071e4
sbb eax, eax
or eax, 1
test eax, eax
je 0x507267
cmp dword [ebp - 0x40], 8
jae 0x5071f1
lea ebx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x5071fd
lea eax, [ebp - 0x24]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x507283
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
mov edi, eax
cmp edi, 3
je 0x50721d
cmp edi, 2
jne 0x50725d
mov eax, dword [ebp - 0x54]
xor edi, edi
cmp dword [ebp - 0x40], 8
jae 0x50722b
lea eax, [ebp - 0x54]
push eax
call fcn.00461e6d
test al, al
je 0x507259
cmp dword [ebp - 0x40], 8
mov ecx, dword [ebp - 0x54]
jae 0x507241
lea ecx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x50724d
lea eax, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x507283
call esi
mov edi, eax
test edi, edi
je 0x507283
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
cmp esi, 8
jae 0x50726f
lea ecx, [ebp - 0x3c]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x50727b
lea eax, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
xor ebx, ebx
lea ecx, [ebp - 0x24]
push ebx
push 1
call fcn.004281f2
push ebx
push 1
lea ecx, [ebp - 0x54]
call fcn.004281f2
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004281f2
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x18