Function at 0x180085f6c
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x3180
call fcn.1800b3cb0
sub rsp, rax
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov qword [rsp + 0x31d8], rbx
mov rax, qword [0x180101090]
xor rax, rsp
mov qword [rsp + 0x3170], rax
mov r13, rdx
mov rbx, rcx
mov rdx, r8
lea rcx, [rsp + 0x90]
call fcn.180089330
nop
mov rcx, qword [rsp + 0xb0]
sub rcx, qword [rsp + 0xa8]
movabs r14, 0x2aaaaaaaaaaaaaab
mov rax, r14
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
xor ebp, ebp
cmp edx, ebp
jg 0x18008600a
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, rbx
call qword [0x18010d230]
mov rbx, rax
mov qword [rsp + 0xd0], rax
cmp rax, rbp
je 0x1800867ce
cmp rax, 0xffffffffffffffff
je 0x1800867ce
mov dword [rsp + 0x48], ebp
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, 0xfff
lea r12d, [rsi + 1]
cmp eax, ebp
jne 0x180086095
cmp dword [rsp + 0x48], ebp
jne 0x18008609a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
cmp eax, r12d
jae 0x1800860a4
cmp dword [rsp + 0x48], ebp
jbe 0x180086159
mov byte [rsp + 0x1170], bpl
mov r8, rsi
xor edx, edx
lea rcx, [rsp + 0x1171]
call fcn.18009e990
mov dword [rsp + 0x44], ebp
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x44]
mov r8d, r12d
lea rdx, [rsp + 0x1170]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
jne 0x180086102
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
movabs rax, 0x706c646f70bfbbef
cmp qword [rsp + 0x1170], rax
jne 0x180086148
cmp dword [rsp + 0x1178], 2
jl 0x180086148
cmp dword [rsp + 0x1178], 0xa
jg 0x180086148
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, r13
call qword [0x18010d230]
mov rdi, rax
mov qword [rsp + 0xc0], rax
cmp rax, rbp
je 0x18008679e
cmp rax, 0xffffffffffffffff
je 0x18008679e
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov r15d, sendto
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], rbp
mov byte [rsp + 0x58], bpl
lea r8d, [r15 - 9]
lea rdx, str.kp_key
lea rcx, [rsp + 0x50]
call fcn.18000f0f0
nop
mov rcx, qword [rsp + 0xb0]
mov r9, qword [rsp + 0xa8]
sub rcx, r9
mov rax, r14
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
jne 0x18008621d
call fcn.18009a80c
mov r9, qword [rsp + 0xa8]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x128]
mov rcx, r9
call fcn.180091518
nop
mov r14d, sendto
cmp qword [rsp + 0x70], r14
jb 0x18008624a
mov rcx, qword [rsp + 0x58]
call fcn.18009a864
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], rbp
mov byte [rsp + 0x58], bpl
lea rdx, [rsp + 0x130]
cmp qword [rsp + 0x148], r14
cmovae rdx, qword [rsp + 0x130]
mov qword [rsp + 0x160], rbp
mov dword [rsp + 0x20], r14d
lea r9, [0x1800d6338]
mov r8d, dword [rsp + 0x140]
lea rcx, [rsp + 0xd8]
call fcn.180082090
cmp qword [rax + 0x20], r14
jb 0x1800862a7
mov rax, qword [rax + 8]
jmp 0x1800862ab
add rax, 8
movdqu xmm0, xmmword [rax]
movdqu xmmword [rsp + 0x150], xmm0
cmp qword [rsp + 0xf8], r14
jb 0x1800862cf
mov rcx, qword [rsp + 0xe0]
call fcn.18009a864
mov qword [rsp + 0x120], r15
mov qword [rsp + 0x118], rbp
mov byte [rsp + 0x108], bpl
mov byte [rsp + 0x170], bpl
mov r8, rsi
xor edx, edx
lea rcx, [rsp + 0x171]
call fcn.18009e990
mov dword [rsp + 0x40], ebp
mov sil, bpl
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x40]
mov r8d, r12d
lea rdx, [rsp + 0x170]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
je 0x180086542
mov r12d, dword [rsp + 0x40]
cmp r12d, ebp
jbe 0x180086533
cmp qword [rsp + 0x118], rbp
jne 0x1800863a2
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], rbp
mov byte [rsp + 0x58], bpl
mov r8, r14
lea rdx, [rsp + 0x170]
lea rcx, [rsp + 0x50]
call fcn.18000f0f0
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x100]
call fcn.18000d880
nop
cmp qword [rsp + 0x70], r14
jb 0x18008639d
mov rcx, qword [rsp + 0x58]
call fcn.18009a864
mov r12d, dword [rsp + 0x40]
jmp 0x1800863a2
mov r12d, dword [rsp + 0x40]
mov eax, r12d
and eax, r15d
je 0x1800863cf
mov esi, r14d
sub esi, eax
mov r8d, esi
mov eax, r12d
lea rcx, [rsp + rax + 0x170]
mov edx, esi
call fcn.18009e990
add r12d, esi
mov dword [rsp + 0x40], r12d
mov sil, 1
mov eax, r12d
shr eax, 4
cmp eax, ebp
jbe 0x18008644d
lea rcx, [rsp + 0x170]
mov r8d, eax
mov r10d, 0x269ec3
lea rdx, [rsp + 0x150]
mov r9d, 4
mov eax, dword [rdx]
imul eax, eax, 0x343fd
add eax, r10d
shr eax, 0x10
mov word [rdx], ax
mov eax, dword [rdx]
imul eax, eax, 0x343fd
add eax, r10d
shr eax, 0x10
mov word [rdx + 2], ax
add rdx, 4
sub r9, 1
jne 0x1800863f8
inc qword [rsp + 0x160]
mov rax, qword [rsp + 0x150]
xor qword [rcx], rax
mov rax, qword [rsp + 0x158]
xor qword [rcx + 8], rax
add rcx, r14
sub r8, 1
jne 0x1800863ea
mov dword [rsp + 0x44], ebp
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x44]
mov r8d, r12d
lea rdx, [rsp + 0x170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebp
je 0x1800864a4
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x40]
mov r12d, 0x1000
mov r8d, r12d
lea rdx, [rsp + 0x170]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
jne 0x18008632e
jmp 0x180086539
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
cmp qword [rsp + 0x120], r14
jb 0x1800864ce
mov rcx, qword [rsp + 0x108]
call fcn.18009a864
mov qword [rsp + 0x120], r15
mov qword [rsp + 0x118], rbp
mov byte [rsp + 0x108], bpl
cmp qword [rsp + 0x148], r14
jb 0x1800864fd
mov rcx, qword [rsp + 0x130]
call fcn.18009a864
mov qword [rsp + 0x148], r15
mov qword [rsp + 0x140], rbp
mov byte [rsp + 0x130], bpl
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
mov r12d, 0x1000
cmp sil, bpl
jne 0x18008665d
movabs rdx, 0x1010101010101010
mov r8, rdx
mov dword [rsp + 0x40], r14d
lea rcx, [rsp + 0x150]
mov r9d, 4
mov eax, dword [rcx]
imul eax, eax, 0x343fd
add eax, 0x269ec3
shr eax, 0x10
mov word [rcx], ax
mov eax, dword [rcx]
imul eax, eax, 0x343fd
add eax, 0x269ec3
shr eax, 0x10
mov word [rcx + 2], ax
add rcx, 4
sub r9, 1
jne 0x180086562
xor rdx, qword [rsp + 0x150]
mov qword [rsp + 0x170], rdx
xor r8, qword [rsp + 0x158]
mov qword [rsp + 0x178], r8
mov dword [rsp + 0x44], ebp
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x44]
mov r8d, r14d
lea rdx, [rsp + 0x170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebp
jne 0x18008665d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
cmp qword [rsp + 0x120], r14
jb 0x180086607
mov rcx, qword [rsp + 0x108]
call fcn.18009a864
mov qword [rsp + 0x120], r15
mov qword [rsp + 0x118], rbp
mov byte [rsp + 0x108], bpl
cmp qword [rsp + 0x148], r14
jb 0x180086636
mov rcx, qword [rsp + 0x130]
call fcn.18009a864
mov qword [rsp + 0x148], r15
mov qword [rsp + 0x140], rbp
mov byte [rsp + 0x130], bpl
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x18008678d
mov dword [rsp + 0x78], ebp
lea rdx, [rsp + 0x8c]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x88], eax
lea rdx, [rsp + 0x84]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x80], eax
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], rbp
mov byte [rsp + 0x58], bpl
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x100]
lea rcx, [rsp + 0x50]
call fcn.18000d880
lea r11, [rsp + 0x50]
mov qword [rsp + 0x20], r11
mov r9, qword [rsp + 0x80]
mov r8, qword [rsp + 0x88]
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x2170]
call fcn.180085b58
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x78]
mov r8d, r12d
lea rdx, [rsp + 0x2170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp qword [rsp + 0x120], r14
jb 0x180086730
mov rcx, qword [rsp + 0x108]
call fcn.18009a864
mov qword [rsp + 0x120], r15
mov qword [rsp + 0x118], rbp
mov byte [rsp + 0x108], bpl
cmp qword [rsp + 0x148], r14
jb 0x18008675f
mov rcx, qword [rsp + 0x130]
call fcn.18009a864
mov qword [rsp + 0x148], r15
mov qword [rsp + 0x140], rbp
mov byte [rsp + 0x130], bpl
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov ebp, esi
lea rcx, [rsp + 0x90]
call fcn.1800892b4
mov eax, ebp
jmp 0x1800867f2
cmp rax, 0xffffffffffffffff
je 0x1800867b3
cmp rax, rbp
je 0x1800867b3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
jmp 0x1800867f2
cmp rax, 0xffffffffffffffff
je 0x1800867e3
cmp rax, rbp
je 0x1800867e3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.1800892b4
xor eax, eax
mov rcx, qword [rsp + 0x3170]
xor rcx, rsp
call fcn.180099fe0
mov rbx, qword [rsp + 0x31d8]
add rsp, 0x3180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret