Function at 0x50ebd8
Capabilities:
Check if file exists
Copy file
Delete directory
Delete file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xb
push 0
push 0
dec ecx
jne 0x50ebe0
push ecx
push ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00406e84
xor eax, eax
push ebp
push 0x50ef99
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1c], 0
jne 0x50ec1d
cmp dword [eax + 0x18], 0xa00000
jb 0x50edc5
jmp 0x50ec23
jl 0x50edc5
mov eax, dword [ebp - 4]
push dword [eax + 0xc]
push 0x50efb4
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x20]
call fcn.0041b918
push dword [ebp - 0x40]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00407a38
mov dl, 1
mov eax, dword [ebp - 0x10]
call fcn.0041c000
test al, al
je 0x50ecc5
mov eax, dword [ebp - 0x10]
call fcn.00407764
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x50ecc5
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
call fcn.00407764
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x50ecbc
test byte [ebp - 0x1f], 4
je 0x50ecbc
test byte [ebp - 0x20], 0x10
je 0x50ecbc
mov eax, dword [ebp - 0x10]
call fcn.00407764
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
jmp 0x50ecc5
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_SetLastError
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x20]
dec eax
cmp eax, 1
jl 0x50ed67
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
push dword [eax + 0xc]
push 0x50efb4
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0xc]
call fcn.0041b918
push dword [ebp - 0x44]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00407a38
mov dl, 1
mov eax, dword [ebp - 0x10]
call fcn.0041c000
test al, al
je 0x50ed5a
mov eax, dword [ebp - 4]
push dword [eax + 0xc]
push 0x50efb4
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 0xc]
inc eax
call fcn.0041b918
push dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.00407a38
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
call fcn.00407764
push eax
mov eax, dword [ebp - 0x10]
call fcn.00407764
push eax
call sub.kernel32.dll_MoveFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x29], al
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jne 0x50ecd9
push 0
lea eax, [ebp - 0x50]
mov ecx, 0x50efcc
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
call fcn.004079b0
mov eax, dword [ebp - 0x50]
call fcn.00407764
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
call fcn.00407764
push eax
call sub.kernel32.dll_CopyFileW
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.0043ef08
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.0043eea4
mov eax, dword [ebp - 4]
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x50eddc
mov eax, dword [ebp - 0x30]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x64
jge 0x50ee52
mov edx, dword [ebp - 8]
mov eax, 0x50efe4
call fcn.00407c8c
test eax, eax
jle 0x50ee1a
mov al, byte [0x50efe8]
push eax
lea eax, [ebp - 0x54]
push eax
mov ecx, 0x50eff8
mov edx, 0x50efe4
mov eax, dword [ebp - 8]
call fcn.00421e28
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 8]
call fcn.004071a8
mov edx, dword [ebp - 8]
mov eax, 0x50f008
call fcn.00407c8c
test eax, eax
jle 0x50ee52
mov al, byte [0x50efe8]
push eax
lea eax, [ebp - 0x58]
push eax
mov ecx, 0x50eff8
mov edx, 0x50f008
mov eax, dword [ebp - 8]
call fcn.00421e28
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 8]
call fcn.004071a8
call fcn.0041de04
fstp qword [ebp - 0x38]
wait
push dword [ebp - 0x34]
push dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
mov edx, dword [0x51dd7c]
mov eax, 0x50f018
call fcn.0041eb84
push dword [ebp - 0x3c]
push 0x50f058
call sub.kernel32.dll_GetCurrentThreadId_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x5c]
call fcn.0041ba5c
push dword [ebp - 0x5c]
push 0x50f068
lea eax, [ebp - 0x18]
mov edx, 4
call fcn.00407a38
call fcn.00423db4
mov edx, eax
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 0x18]
call fcn.004af914
mov eax, dword [ebp - 0x14]
call fcn.004088c0
mov ecx, eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x14]
call fcn.004088c0
cdq
mov ecx, dword [ebp - 4]
add dword [ecx + 0x18], eax
adc dword [ecx + 0x1c], edx
call fcn.00423db4
mov edx, eax
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 8]
call fcn.004af914
mov eax, dword [ebp - 0x14]
call fcn.004088c0
mov ecx, eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x14]
call fcn.004088c0
cdq
mov ecx, dword [ebp - 4]
add dword [ecx + 0x18], eax
adc dword [ecx + 0x1c], edx
call fcn.00423db4
mov edx, eax
lea ecx, [ebp - 0x14]
mov eax, 0x50f07c
call fcn.004af914
mov eax, dword [ebp - 0x14]
call fcn.004088c0
mov ecx, eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x14]
call fcn.004088c0
cdq
mov ecx, dword [ebp - 4]
add dword [ecx + 0x18], eax
adc dword [ecx + 0x1c], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50efa0
lea eax, [ebp - 0x5c]
mov edx, 9
call fcn.00406e00
lea eax, [ebp - 0x18]
call fcn.00406da0
lea eax, [ebp - 0x14]
mov edx, dword [0x41668c]
call fcn.00408a94
lea eax, [ebp - 0x10]
call fcn.00406da0
lea eax, [ebp - 8]
call fcn.00406da0
ret