Function at 0x1400a8d20
Capabilities:
Delete file
Move file

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x1e0
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x14030bc70]
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 0x1400a9178
cmp byte [rdx], 0
je 0x1400a9178
mov rcx, rbx
call fcn.1400a7590
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 0x1400a8dc0
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x1400a8e0a
cmp eax, 2
jbe 0x1400a8dff
cmp eax, 3
je 0x1400a8e04
cmp eax, 4
jne 0x1400a8e0a
mov rcx, rdx
call fcn.1400fafb0
test eax, eax
sete sil
mov dword [rsp + 0x44], esi
lea r9, [rbx + 0x3c]
jmp 0x1400a8e0e
mov esi, 1
mov dword [rsp + 0x44], esi
jmp 0x1400a8e0e
mov dword [rsp + 0x54], esi
mov eax, dword [rsp + 0x48]
and eax, 0x40000000
mov dword [rsp + 0x70], eax
je 0x1400a8e6e
mov dword [rbx + 0x28], 1
mov rcx, r9
call fcn.1400fafb0
test eax, eax
je 0x1400a8e59
lea rdx, [rsp + 0x88]
lea rcx, [rbx + 0x3c]
call fcn.140157c24
test eax, eax
jne 0x1400a8e59
cmp dword [rsp + 0x9c], eax
jne 0x1400a8e59
mov esi, 1
mov dword [rsp + 0x44], esi
jmp 0x1400a8e6e
test esi, esi
jne 0x1400a8e6e
mov dword [rbx + 0x2c], 1
mov eax, dword [rsp + 0x228]
mov dword [rbx + 0x30], eax
mov rcx, qword [rbx + 0x368]
test rcx, rcx
je 0x1400a8e8f
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x368], 0
cmp dword [rsp + 0x54], 0
je 0x1400a9161
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 0x1400a9130
mov r8, rdi
mov edx, esi
mov rcx, rbx
call fcn.1400aa790
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
je 0x1400a9122
mov eax, dword [rbx + 0x184]
mov dword [rsp + 0x74], eax
mov rcx, rbx
call fcn.1400abbc0
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 0x1400a911e
cmp edi, 7
jne 0x1400a8fd7
cmp dword [rsp + 0x68], ecx
je 0x1400a8fe5
cmp dword [rsp + 0x6c], ecx
jne 0x1400a8fe5
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.1400a8d20
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x1400a8fd7
xor edx, edx
mov rcx, rbx
call fcn.1400a8b60
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.1400a8d20
mov edi, eax
mov dword [rsp + 0x40], eax
lea eax, [rdi - 5]
test eax, 0xfffffffd
jne 0x1400a911e
cmp dword [rsp + 0x70], 0
je 0x1400a911e
test esi, esi
jne 0x1400a911e
xor edx, edx
mov r8d, 0x104
lea rcx, [rsp + 0xc0]
call fcn.140141ad0
mov r8d, 0x104
mov rsi, qword [rsp + 0x58]
mov rdx, rsi
lea rcx, [rsp + 0xc0]
call fcn.1400f7fd0
lea rax, [rsp + 0xc0]
or rcx, 0xffffffffffffffff
lea rcx, [rcx + 1]
cmp byte [rax + rcx], 0
jne 0x1400a9034
lea rax, [rsp + 0xc0]
mov byte [rcx + rax - 1], gethostbyname
mov rdx, rsi
lea rcx, [rsp + 0xc0]
call fcn.140156fb4
test eax, eax
je 0x1400a911e
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 + reloc.WS2_32.dll_recv]
lea rcx, [rsp + 0xc0]
call fcn.1400fafb0
test eax, eax
je 0x1400a909f
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 0x1400a90bd
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rcx, rsi
call fcn.1400fafb0
test eax, eax
jne 0x1400a9105
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.1400a8d20
mov edi, eax
mov dword [rsp + 0x40], eax
test edi, edi
je 0x1400a9122
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 + reloc.WS2_32.dll_recv]
test edi, edi
jne 0x1400a9161
mov rcx, qword [rbx + 0x358]
call fcn.1400a9450
jmp 0x1400a9161
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.1400fc6a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
jmp 0x1400a916c
mov rcx, rbx
call fcn.1400abb30
mov eax, edi
jmp 0x1400a917d
mov eax, 1
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140113910
add rsp, 0x1e0
pop rdi
pop rsi
pop rbx
ret