Function at 0x140028960
Capabilities:
Delete file
Move file

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x1e0
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x1401385c0]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
mov dword [rsp + 0x50], r9d
mov dword [rsp + 0x48], r8d
mov qword [rsp + 0x58], rdx
mov rbx, rcx
mov qword [rsp + 0x78], rcx
mov ecx, dword [rsp + 0x220]
mov dword [rsp + 0x4c], ecx
mov rcx, qword [rsp + 0x230]
mov qword [rsp + 0x60], rcx
mov edi, 2
mov dword [rsp + 0x40], edi
test rdx, rdx
je 0x140028db8
cmp byte [rdx], 0
je 0x140028db8
mov rcx, rbx
call fcn.1400278f0
nop
xor esi, esi
mov dword [rsp + 0x44], esi
mov dword [rsp + 0x54], 1
mov rdx, qword [rsp + 0x58]
mov rcx, rdx
lea r9, [rbx + 0x3c]
mov r8, rbx
sub r8, rdx
nop dword [rax]
movzx eax, byte [rcx]
mov byte [r8 + rcx + 0x3c], al
lea rcx, [rcx + 1]
test al, al
jne 0x140028a00
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x140028a4a
cmp eax, 2
jbe 0x140028a3f
cmp eax, 3
je 0x140028a44
cmp eax, 4
jne 0x140028a4a
mov rcx, rdx
call fcn.140049390
test eax, eax
sete sil
mov dword [rsp + 0x44], esi
lea r9, [rbx + 0x3c]
jmp 0x140028a4e
mov esi, 1
mov dword [rsp + 0x44], esi
jmp 0x140028a4e
mov dword [rsp + 0x54], esi
mov eax, dword [rsp + 0x48]
and eax, 0x40000000
mov dword [rsp + 0x70], eax
je 0x140028aae
mov dword [rbx + 0x28], 1
mov rcx, r9
call fcn.140049390
test eax, eax
je 0x140028a99
lea rdx, [rsp + 0x88]
lea rcx, [rbx + 0x3c]
call fcn.14006cc44
test eax, eax
jne 0x140028a99
cmp dword [rsp + 0x9c], eax
jne 0x140028a99
mov esi, 1
mov dword [rsp + 0x44], esi
jmp 0x140028aae
test esi, esi
jne 0x140028aae
mov dword [rbx + 0x2c], 1
mov eax, dword [rsp + 0x228]
mov dword [rbx + 0x30], eax
mov rcx, qword [rbx + 0x368]
test rcx, rcx
je 0x140028acf
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x368], 0
cmp dword [rsp + 0x54], 0
je 0x140028da1
mov rdi, qword [rsp + 0x60]
mov eax, dword [rdi + 0x18]
bts eax, 0x1c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, dword [rsp + 0x50]
mov edx, dword [rsp + 0x48]
lea rcx, [rbx + 0x3c]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x358], rax
cmp rax, 0xffffffffffffffff
je 0x140028d70
mov r8, rdi
mov edx, esi
mov rcx, rbx
call fcn.14002a110
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
je 0x140028d62
mov eax, dword [rbx + 0x184]
mov dword [rsp + 0x74], eax
mov rcx, rbx
call fcn.14002b500
mov dword [rsp + 0x68], eax
mov eax, dword [rbx + 0x28]
mov dword [rsp + 0x6c], eax
mov rcx, qword [rbx + 0x358]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [rbx + 0x358], rcx
cmp dword [rsp + 0x238], ecx
je 0x140028d5e
cmp edi, 7
jne 0x140028c17
cmp dword [rsp + 0x68], ecx
je 0x140028c25
cmp dword [rsp + 0x6c], ecx
jne 0x140028c25
mov dword [rsp + 0x38], ecx
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 0xc0000000
mov rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140028960
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x140028c17
xor edx, edx
mov rcx, rbx
call fcn.1400287a0
xor ecx, ecx
mov dword [rsp + 0x38], ecx
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140028960
mov edi, eax
mov dword [rsp + 0x40], eax
lea eax, [rdi - 5]
test eax, 0xfffffffd
jne 0x140028d5e
cmp dword [rsp + 0x70], 0
je 0x140028d5e
test esi, esi
jne 0x140028d5e
xor edx, edx
mov r8d, 0x104
lea rcx, [rsp + 0xc0]
call fcn.140060ef0
mov r8d, 0x104
mov rsi, qword [rsp + 0x58]
mov rdx, rsi
lea rcx, [rsp + 0xc0]
call fcn.140049060
lea rax, [rsp + 0xc0]
or rcx, 0xffffffffffffffff
lea rcx, [rcx + 1]
cmp byte [rax + rcx], 0
jne 0x140028c74
lea rax, [rsp + 0xc0]
mov byte [rcx + rax - 1], gethostbyname
mov rdx, rsi
lea rcx, [rsp + 0xc0]
call fcn.140069fa8
test eax, eax
je 0x140028d5e
mov rax, qword [rbx]
mov ecx, dword [rsp + 0x74]
mov dword [rsp + 0x20], ecx
mov r9, rsi
lea r8, str.Corrupt_file___s__type__d__accessed_for_write_access._Resetting.
xor edx, edx
mov rcx, rbx
call qword [rax + 0x10]
lea rcx, [rsp + 0xc0]
call fcn.140049390
test eax, eax
je 0x140028cdf
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0xc0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x140028cfd
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rcx, rsi
call fcn.140049390
test eax, eax
jne 0x140028d45
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x228]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 2
mov r9d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x48]
mov rdx, rsi
mov rcx, rbx
call fcn.140028960
mov edi, eax
mov dword [rsp + 0x40], eax
test edi, edi
je 0x140028d62
mov rax, qword [rbx]
mov r9, rsi
lea r8, str.Unable_to_recover_from_corrupt_file__s__
xor edx, edx
mov rcx, rbx
call qword [rax + 0x10]
test edi, edi
jne 0x140028da1
mov rcx, qword [rbx + 0x358]
call fcn.140028de0
jmp 0x140028da1
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
xor edi, edi
cmp eax, 1
seta dil
inc edi
mov dword [rsp + 0x40], edi
mov qword [rbx + 0x358], 0
xor ecx, ecx
call fcn.140049b30
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
jmp 0x140028dac
mov rcx, rbx
call fcn.14002b470
mov eax, edi
jmp 0x140028dbd
mov eax, 1
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14005f0d0
add rsp, 0x1e0
pop rdi
pop rsi
pop rbx
ret