Function at 0x5049b8
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x6b6902
call fcn.00651da4
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.0045c5cd
and dword [ebp - 4], 0
lea eax, [ebp - 0x54]
push ebx
push dword [ebp + 8]
push dword [ebp + 0x14]
push eax
call fcn.0045c5cd
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 0x504a22
lea eax, [ebp - 0x3c]
push eax
call fcn.0045d475
test al, al
jne 0x504a7f
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x6c]
push dword [ebp + 0x10]
push eax
call fcn.0045c5cd
push eax
lea ecx, [ebp - 0x3c]
call fcn.004281d1
push 0
push 1
lea ecx, [ebp - 0x6c]
call fcn.004284eb
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00436351
test eax, eax
je 0x504b3e
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x504a71
lea eax, [ebp - 0x3c]
push eax
call fcn.0045d475
test al, al
je 0x504b3e
mov edi, dword [ebp + 8]
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x504a8e
lea eax, [ebp - 0x3c]
push esi
push eax
lea eax, [ebp - 0x6c]
push str._s._d
push eax
call fcn.00462014
add esp, 0x10
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.00428537
push 0
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.004284eb
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x504ace
lea eax, [ebp - 0x24]
push eax
call fcn.0045d475
test al, al
jne 0x504b0e
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x504ae4
lea eax, [ebp - 0x24]
cmp dword [edi + 0x14], 8
jb 0x504aee
mov ebx, dword [edi]
jmp 0x504af0
mov ebx, edi
push eax
call fcn.0045c825
push ebx
mov esi, eax
call fcn.0045c825
push esi
push eax
call fcn.006775ba
pop ecx
pop ecx
test eax, eax
jne 0x504b17
mov esi, dword [ebp + 0x14]
inc esi
mov dword [ebp + 0x14], esi
jmp 0x504a82
mov ecx, dword [ebp - 0x24]
push 8
pop esi
cmp dword [ebp - 0x10], esi
jae 0x504b25
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x504b30
lea eax, [ebp - 0x3c]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
push ecx
push eax
call ebx
test eax, eax
jne 0x504b45
xor edi, edi
jmp 0x504c8f
cmp byte [ebp + 0x1c], 0
je 0x504b9d
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x504b56
lea eax, [ebp - 0x54]
push eax
call fcn.0045d475
test al, al
je 0x504b9d
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jae 0x504b6b
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x504b9d
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jae 0x504b81
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x10], esi
jae 0x504b8c
lea eax, [ebp - 0x24]
push ecx
push eax
call ebx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
jmp 0x504c8f
mov ebx, dword [ebp - 0x54]
mov eax, ebx
cmp dword [ebp - 0x40], esi
jae 0x504baa
lea eax, [ebp - 0x54]
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov edx, ecx
cmp esi, 8
jae 0x504bba
lea edx, [ebp - 0x3c]
mov di, word [edx]
cmp di, word [eax]
mov edi, dword [ebp + 0x18]
jne 0x504beb
cmp word [edx], di
je 0x504be7
mov di, word [edx + 2]
cmp di, word [eax + 2]
mov word [ebp + 0x1e], di
mov edi, dword [ebp + 0x18]
jne 0x504beb
add edx, 4
add eax, 4
cmp word [ebp + 0x1e], di
jne 0x504bba
xor eax, eax
jmp 0x504bf0
sbb eax, eax
or eax, 1
test eax, eax
je 0x504c73
cmp dword [ebp - 0x40], 8
jae 0x504bfd
lea ebx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x504c09
lea eax, [ebp - 0x24]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x504c8f
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
mov edi, eax
cmp edi, 3
je 0x504c29
cmp edi, 2
jne 0x504c69
mov eax, dword [ebp - 0x54]
xor edi, edi
cmp dword [ebp - 0x40], 8
jae 0x504c37
lea eax, [ebp - 0x54]
push eax
call fcn.0045e721
test al, al
je 0x504c65
cmp dword [ebp - 0x40], 8
mov ecx, dword [ebp - 0x54]
jae 0x504c4d
lea ecx, [ebp - 0x54]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x504c59
lea eax, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x504c8f
call esi
mov edi, eax
test edi, edi
je 0x504c8f
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
cmp esi, 8
jae 0x504c7b
lea ecx, [ebp - 0x3c]
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x504c87
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.004284eb
push ebx
push 1
lea ecx, [ebp - 0x54]
call fcn.004284eb
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004284eb
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