Function at 0x507b04
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x6aa1d8
call fcn.006426c4
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.00460a53
and dword [ebp - 4], 0
lea eax, [ebp - 0x54]
push ebx
push dword [ebp + 8]
push dword [ebp + 0x14]
push eax
call fcn.00460a53
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 0x507b6e
lea eax, [ebp - 0x3c]
push eax
call fcn.004618ab
test al, al
jne 0x507bcb
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x6c]
push dword [ebp + 0x10]
push eax
call fcn.00460a53
push eax
lea ecx, [ebp - 0x3c]
call fcn.00428071
push 0
push 1
lea ecx, [ebp - 0x6c]
call fcn.004285f6
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004392c2
test eax, eax
je 0x507c8a
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x507bbd
lea eax, [ebp - 0x3c]
push eax
call fcn.004618ab
test al, al
je 0x507c8a
mov edi, dword [ebp + 8]
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x507bda
lea eax, [ebp - 0x3c]
push esi
push eax
lea eax, [ebp - 0x6c]
push str._s._d
push eax
call fcn.00465d7f
add esp, 0x10
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.00428642
push 0
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.004285f6
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x507c1a
lea eax, [ebp - 0x24]
push eax
call fcn.004618ab
test al, al
jne 0x507c5a
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x507c30
lea eax, [ebp - 0x24]
cmp dword [edi + 0x14], 8
jb 0x507c3a
mov ebx, dword [edi]
jmp 0x507c3c
mov ebx, edi
push eax
call fcn.00460cab
push ebx
mov esi, eax
call fcn.00460cab
push esi
push eax
call fcn.00667f5f
pop ecx
pop ecx
test eax, eax
jne 0x507c63
mov esi, dword [ebp + 0x14]
inc esi
mov dword [ebp + 0x14], esi
jmp 0x507bce
mov ecx, dword [ebp - 0x24]
push 8
pop esi
cmp dword [ebp - 0x10], esi
jae 0x507c71
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x507c7c
lea eax, [ebp - 0x3c]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
push ecx
push eax
call ebx
test eax, eax
jne 0x507c91
xor edi, edi
jmp 0x507ddb
cmp byte [ebp + 0x1c], 0
je 0x507ce9
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x507ca2
lea eax, [ebp - 0x54]
push eax
call fcn.004618ab
test al, al
je 0x507ce9
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x507cb7
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x507ce9
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x507ccd
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x10], esi
jae 0x507cd8
lea eax, [ebp - 0x24]
push ecx
push eax
call ebx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
jmp 0x507ddb
mov ebx, dword [ebp - 0x54]
mov eax, ebx
cmp dword [ebp - 0x40], esi
jae 0x507cf6
lea eax, [ebp - 0x54]
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov edx, ecx
cmp esi, 8
jae 0x507d06
lea edx, [ebp - 0x3c]
mov di, word [edx]
cmp di, word [eax]
mov edi, dword [ebp + 0x18]
jne 0x507d37
cmp word [edx], di
je 0x507d33
mov di, word [edx + 2]
cmp di, word [eax + 2]
mov word [ebp + 0x1e], di
mov edi, dword [ebp + 0x18]
jne 0x507d37
add edx, 4
add eax, 4
cmp word [ebp + 0x1e], di
jne 0x507d06
xor eax, eax
jmp 0x507d3c
sbb eax, eax
or eax, 1
test eax, eax
je 0x507dbf
cmp dword [ebp - 0x40], 8
jae 0x507d49
lea ebx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x507d55
lea eax, [ebp - 0x24]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x507ddb
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
mov edi, eax
cmp edi, 3
je 0x507d75
cmp edi, 2
jne 0x507db5
mov eax, dword [ebp - 0x54]
xor edi, edi
cmp dword [ebp - 0x40], 8
jae 0x507d83
lea eax, [ebp - 0x54]
push eax
call fcn.004626bc
test al, al
je 0x507db1
cmp dword [ebp - 0x40], 8
mov ecx, dword [ebp - 0x54]
jae 0x507d99
lea ecx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x507da5
lea eax, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x507ddb
call esi
mov edi, eax
test edi, edi
je 0x507ddb
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
cmp esi, 8
jae 0x507dc7
lea ecx, [ebp - 0x3c]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x507dd3
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.004285f6
push ebx
push 1
lea ecx, [ebp - 0x54]
call fcn.004285f6
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004285f6
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