Function at 0x509cc4
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
xor edx, edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50a04f
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov eax, dword [ebp - 4]
push dword [eax + 0x180]
mov eax, dword [ebp - 4]
push dword [eax + 0x250]
push 0x50a068
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.0040556c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 0
je 0x509d77
mov edx, 0x50a080
mov eax, dword [ebp - 4]
call fcn.00511784
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x27c]
push eax
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x178]
call fcn.004c6df4
jmp 0x509e0a
mov eax, dword [ebp - 4]
push dword [eax + 0x184]
mov eax, dword [ebp - 4]
push dword [eax + 0x250]
push 0x50a0ac
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.0040556c
mov eax, dword [ebp - 0x34]
call fcn.0040a2a8
test al, al
jne 0x509db0
mov byte [ebp - 5], 1
jmp 0x50a02c
mov edx, 0x50a0bc
mov eax, dword [ebp - 4]
call fcn.00511784
mov eax, dword [ebp - 4]
push dword [eax + 0x184]
mov eax, dword [ebp - 4]
push dword [eax + 0x250]
push 0x50a0ac
lea eax, [ebp - 0x38]
mov edx, 3
call fcn.0040556c
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004fd858
test al, al
jne 0x509e0a
mov eax, dword [ebp - 4]
add eax, 0x238
mov edx, 0x50a0e8
call fcn.0040523c
jmp 0x50a02c
mov eax, dword [ebp - 0xc]
call fcn.004dc2b4
mov ebx, eax
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov eax, dword [ebp - 0x3c]
call fcn.004dc2b4
cmp ebx, eax
setg byte [ebp - 0x21]
mov eax, dword [ebp - 0xc]
call fcn.004dc390
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov eax, dword [ebp - 0x40]
call fcn.004dc390
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x1c]
jne 0x509e88
cmp eax, dword [ebp - 0x20]
jbe 0x50a01a
jmp 0x509e8e
jle 0x50a01a
push 3
mov eax, dword [ebp - 4]
push dword [eax + 0x180]
mov eax, dword [ebp - 4]
push dword [eax + 0x250]
push 0x50a118
lea eax, [ebp - 0x44]
mov edx, 3
call fcn.0040556c
mov eax, dword [ebp - 0x44]
call fcn.004056ac
push eax
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov eax, dword [ebp - 0x48]
call fcn.004056ac
push eax
call sub.kernel32.dll_MoveFileExA
test eax, eax
je 0x509f93
push 3
lea eax, [ebp - 0x4c]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov eax, dword [ebp - 0x4c]
call fcn.004056ac
push eax
mov eax, dword [ebp - 0xc]
call fcn.004056ac
push eax
call sub.kernel32.dll_MoveFileExA
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 0
je 0x509f35
mov eax, dword [ebp - 4]
mov byte [eax + 0x26d], 1
jmp 0x509f3d
mov eax, dword [ebp - 4]
call fcn.00500060
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x509f57
mov eax, dword [ebp - 0x28]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jle 0x509f6d
mov eax, dword [ebp - 4]
add eax, 0x20
mov edx, 0x50a128
call fcn.004054b4
mov eax, dword [ebp - 4]
add eax, 0x20
mov edx, 0x50a134
call fcn.004054b4
cmp byte [ebp - 0x21], 0
je 0x50a028
mov eax, dword [ebp - 4]
mov byte [eax + 0x19], 1
jmp 0x50a028
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 0
je 0x509fa8
mov eax, dword [ebp - 4]
mov byte [eax + 0x26d], 1
jmp 0x509fb0
mov eax, dword [ebp - 4]
call fcn.00500060
lea eax, [ebp - 0x50]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x250]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x180]
call fcn.004054f8
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x509ff2
mov eax, dword [ebp - 0x2c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jle 0x50a008
mov eax, dword [ebp - 4]
add eax, 0x20
mov edx, 0x50a128
call fcn.004054b4
mov eax, dword [ebp - 4]
add eax, 0x20
mov edx, 0x50a134
call fcn.004054b4
jmp 0x50a028
mov eax, dword [ebp - 0xc]
call fcn.004056ac
push eax
call sub.kernel32.dll_DeleteFileA
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50a056
lea eax, [ebp - 0x50]
mov edx, 9
call fcn.0040520c
lea eax, [ebp - 0xc]
call fcn.004051e8
ret