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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2d0]
sub rsp, 0x3d0
mov r13, rcx
xor edi, edi
mov dword [rbp - 0x78], edi
lea rax, [0x140069ce0]
mov qword [rbp - 0x70], rax
lea r8, [rbp - 0x78]
lea rcx, [rsp + 0x68]
call fcn.140021c90
nop
movabs rsi, 0xcccccccccccccccd
mov r15, qword [rsp + 0x70]
mov r12, qword [rsp + 0x68]
cmp dword [rbp - 0x78], edi
jne 0x140022cc1
cmp r12, r15
je 0x140022cbe
mov r8, r15
sub r8, r12
sar r8, 3
imul r8, rsi
movzx r9d, byte [rbp + 0x320]
mov rdx, r15
mov rcx, r12
call fcn.140024b70
mov esi, edi
mov r12, qword [rsp + 0x68]
mov r15, qword [rsp + 0x70]
mov qword [rbp - 0x80], r15
cmp r12, r15
je 0x140022cb4
mov r15, r12
cmp qword [r12 + 0x18], 8
jb 0x140022240
mov r15, qword [r12]
mov rcx, r15
cmp esi, 0xa
jge 0x140022da5
mov ebx, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
call qword [0x140069020]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400222ea
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x140022291
cmp eax, 2
jne 0x1400222e0
test ebx, ebx
jle 0x1400222e0
mov ecx, 0xc8
cmp ebx, ecx
cmovl ecx, ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, 0xc8
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, r15
call qword [0x140069020]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140022281
jmp 0x1400222ea
cmp rdi, 0xffffffffffffffff
je 0x140022c9a
test rdi, rdi
je 0x140022c9a
inc esi
mov dword [rbp + 0x320], esi
lea rdx, [rsp + 0x44]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [rsp + 0x40], eax
cmp eax, 0xffffffff
jne 0x140022334
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140022330
mov rbx, 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
mov esi, dword [rsp + 0x40]
jmp 0x140022342
mov esi, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140022d97
mov rcx, rbx
call fcn.140028ffc
mov r14, rax
mov qword [rsp + 0x58], rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.14002b060
mov qword [rbp + 0x170], r14
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x328]
mov r8d, esi
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov r14, 0xffffffffffffffff
je 0x140022397
mov r14d, dword [rbp + 0x328]
mov rcx, rdi
call qword [0x140069018]
cmp r14, rbx
mov r14, qword [rsp + 0x58]
jne 0x140022c8c
xor edi, edi
mov qword [rbp + 0x270], rdi
lea rax, [rbp + 0x238]
mov qword [rsp + 0x28], rax
mov r8d, esi
mov rdx, r14
lea rcx, [rbp + 0x110]
call fcn.14000c2c0
nop
cmp byte [rbp + 0x126], dil
je 0x1400223e3
mov al, 3
jmp 0x140022419
cmp byte [rbp + 0x125], 0
je 0x1400223f0
mov al, 1
jmp 0x140022419
mov eax, dword [rbp + 0x120]
cmp eax, 0xffffffff
jne 0x1400223ff
mov al, 7
jmp 0x140022419
mov rcx, qword [rbp + 0x110]
cmp qword [rcx + 0x20], 0
je 0x140022413
add rax, qword [rcx + 0x10]
jmp 0x140022416
mov rax, rdi
movzx eax, byte [rax]
cmp al, 7
je 0x140022c36
xorps xmm0, xmm0
movdqu xmmword [rbp + 8], xmm0
mov dword [rbp + 0x18], 0xffffffff
mov dword [rbp + 0x1c], 0x10000
movdqu xmmword [rbp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x30], xmm1
mov qword [rbp + 0x40], rdi
lea rax, str.type
mov qword [rbp + 0x48], rax
mov qword [rbp + 0x50], rdi
mov dword [rbp + 0x58], 4
lea r8, [rbp + 8]
lea rdx, [rbp + 0x188]
lea rcx, [rbp + 0x110]
call fcn.14000b280
cmp byte [rbp + 0x19e], 0
je 0x140022483
mov sil, 3
jmp 0x1400224bb
cmp byte [rbp + 0x19d], 0
je 0x140022491
mov sil, 1
jmp 0x1400224bb
mov eax, dword [rbp + 0x198]
cmp eax, 0xffffffff
jne 0x1400224a1
mov sil, 7
jmp 0x1400224bb
mov rcx, qword [rbp + 0x188]
cmp qword [rcx + 0x20], 0
je 0x1400224b5
add rax, qword [rcx + 0x10]
jmp 0x1400224b8
mov rax, rdi
movzx esi, byte [rax]
lea rcx, [rbp + 0x1a8]
call fcn.14000ab10
mov rcx, qword [rbp + 0x190]
test rcx, rcx
je 0x14002251c
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14002251c
mov rbx, qword [rbp + 0x190]
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14002251c
mov rcx, qword [rbp + 0x190]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x1400533a8]
nop
mov rbx, qword [rbp + 0x40]
test rbx, rbx
je 0x140022562
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022562
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022562
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0x30]
test rbx, rbx
je 0x1400225a8
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1400225a8
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400225a8
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0x10]
test rbx, rbx
je 0x1400225ee
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1400225ee
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400225ee
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x60], xmm0
mov dword [rbp + 0x70], 0xffffffff
mov dword [rbp + 0x74], 0x10000
movdqu xmmword [rbp + 0x78], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x88], xmm1
mov qword [rbp + 0x98], rdi
lea rax, str.deviceId
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], rdi
mov dword [rbp + 0xb0], 8
lea r8, [rbp + 0x60]
lea rdx, [rbp + 0x1e0]
lea rcx, [rbp + 0x110]
call fcn.14000b280
cmp byte [rbp + 0x1f6], 0
je 0x14002265f
mov dil, 3
jmp 0x140022697
cmp byte [rbp + 0x1f5], 0
je 0x14002266d
mov dil, 1
jmp 0x140022697
mov eax, dword [rbp + 0x1f0]
cmp eax, 0xffffffff
jne 0x14002267d
mov dil, 7
jmp 0x140022697
mov rcx, qword [rbp + 0x1e0]
cmp qword [rcx + 0x20], 0
je 0x140022691
add rax, qword [rcx + 0x10]
jmp 0x140022694
mov rax, rdi
movzx edi, byte [rax]
lea rcx, [rbp + 0x200]
call fcn.14000ab10
mov rcx, qword [rbp + 0x1e8]
test rcx, rcx
je 0x1400226f8
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1400226f8
mov rbx, qword [rbp + 0x1e8]
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400226f8
mov rcx, qword [rbp + 0x1e8]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x1400533a8]
nop
mov rbx, qword [rbp + 0x98]
test rbx, rbx
je 0x140022741
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022741
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022741
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0x88]
test rbx, rbx
je 0x14002278a
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14002278a
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14002278a
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0x68]
test rbx, rbx
je 0x1400227d0
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1400227d0
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400227d0
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
cmp sil, 7
je 0x140022c36
cmp dil, 7
je 0x140022c36
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xb8], xmm0
mov dword [rbp + 0xc8], 0xffffffff
mov dword [rbp + 0xcc], 0x10000
movdqu xmmword [rbp + 0xd0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xe0], xmm1
xor edi, edi
mov qword [rbp + 0xf0], rdi
lea rax, str.type
mov qword [rbp + 0xf8], rax
mov qword [rbp + 0x100], rdi
mov dword [rbp + 0x108], 4
lea r8, [rbp + 0xb8]
lea rdx, [rbp + 0x278]
lea rcx, [rbp + 0x110]
call fcn.14000b280
nop
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x278]
call fcn.14000b980
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x68], xmm0
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x140022883
lock inc dword [rcx + 8]
mov rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x30]
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rcx
movdqu xmmword [rbp - 0x58], xmm0
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400228a5
lock inc dword [rcx + 8]
mov rcx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rcx
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x48], rax
mov rax, qword [rbp - 8]
mov qword [rbp - 0x40], rax
mov eax, dword [rbp]
mov dword [rbp - 0x38], eax
lea rax, [rbp - 0x68]
mov qword [rsp + 0x60], rax
lea rbx, str.UI_STATS
lea rsi, str.unknown_error
nop
lea rcx, [rbp - 0x68]
call fcn.14000d450
mov rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], 0
jne 0x1400228f0
mov qword [rbp + 0x178], rcx
mov r11, qword [rbx + 8]
mov qword [rbp + 0x180], r11
mov r9, r11
cmp rcx, r11
cmovb r9, rcx
mov r10, qword [rbx]
test r9, r9
je 0x140022953
movzx edx, word [r10]
movzx r8d, word [rax]
cmp dx, r8w
jb 0x14002295a
sub r10, rax
cmp dx, r8w
ja 0x14002295a
cmp r9, 1
je 0x140022953
dec r9
add rax, 2
movzx edx, word [r10 + rax]
movzx r8d, word [rax]
cmp dx, r8w
jae 0x140022933
jmp 0x14002295a
cmp r11, rcx
jb 0x14002295a
jbe 0x140022967
add rbx, 0x18
cmp rbx, rsi
jne 0x1400228e0
lea rcx, [rbp - 0x68]
call fcn.14000ab10
cmp rbx, rsi
je 0x14002297a
mov ebx, dword [rbx + 0x10]
jmp 0x14002297f
mov ebx, 0xffffffff
lea rcx, [rbp - 0x30]
call fcn.14000ab10
mov dword [r13 + 0x178], ebx
lea rcx, [rbp + 0x298]
call fcn.14000ab10
mov rbx, qword [rbp + 0x280]
test rbx, rbx
je 0x1400229e5
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1400229e5
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400229e5
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
nop
mov rbx, qword [rbp + 0xf0]
test rbx, rbx
je 0x140022a2e
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022a2e
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022a2e
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0xe0]
test rbx, rbx
je 0x140022a77
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022a77
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022a77
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
mov rbx, qword [rbp + 0xc0]
test rbx, rbx
je 0x140022ac0
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022ac0
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022ac0
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
cmp dword [r13 + 0x178], 0xffffffff
jne 0x140022b33
lea rcx, [rbp + 0x130]
call fcn.14000ab10
mov rbx, qword [rbp + 0x118]
test rbx, rbx
je 0x140022b20
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022b20
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022b20
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
nop
mov rcx, r14
call fcn.140028ff4
mov esi, dword [rbp + 0x320]
jmp 0x140022c9c
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [r15 + r8*2], 0
jne 0x140022b40
lea rcx, [r13 + 0x100]
mov rdx, r15
call fcn.14000cf60
mov rcx, r13
call fcn.140023b50
test al, al
jne 0x140022b8e
cmp qword [r13 + 0x130], 0
je 0x140022c36
lea rcx, [r13 + 0x120]
cmp qword [rcx + 0x18], 8
jb 0x140022c2f
mov rcx, qword [rcx]
jmp 0x140022c2f
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
cmp qword [r13 + 0x60], 0
setne r8b
lea rdx, [rsp + 0x48]
mov rcx, r13
call fcn.1400231f0
mov edx, eax
cmp qword [r13 + 0x60], 0
je 0x140022bbc
cmp eax, 0xc
je 0x140022bc1
cmp eax, 0xd
jne 0x140022bd3
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov rcx, r13
call fcn.1400231f0
mov edx, eax
xor bl, bl
test edx, edx
je 0x140022c01
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x48]
mov r8d, dword [rsp + 0x54]
lea rcx, str.result:_d__chs_sessionid_d__chs_reply_d__chs_exitcode_d__chs_waitminutes_d_n
call fcn.140025ce0
jmp 0x140022c11
movzx ebx, bl
cmp dword [rsp + 0x48], 4
mov eax, 1
cmove ebx, eax
lea rcx, [r13 + 0x120]
cmp qword [rcx + 0x18], 8
jb 0x140022c22
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test bl, bl
je 0x140022c36
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
lea rcx, [rbp + 0x130]
call fcn.14000ab10
mov rbx, qword [rbp + 0x118]
test rbx, rbx
je 0x140022c8c
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140022c8c
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax]
call qword [0x1400533a8]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140022c8c
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1400533a8]
nop
mov rcx, r14
call fcn.140028ff4
mov esi, dword [rbp + 0x320]
xor edi, edi
add r12, 0x28
cmp r12, qword [rbp - 0x80]
jne 0x140022231
mov r15, qword [rsp + 0x70]
mov r12, qword [rsp + 0x68]
movabs rsi, 0xcccccccccccccccd
mov dil, 1
test r12, r12
je 0x140022d78
cmp r12, r15
je 0x140022d36
lea rbx, [r12 + 0x18]
mov rdx, qword [rbx]
cmp rdx, 8
jb 0x140022d13
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx - 0x18]
cmp rdx, 0x1000
jb 0x140022d0e
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140022db0
mov rcx, r8
call fcn.140028ff4
xor eax, eax
mov qword [rbx - 8], rax
mov qword [rbx], 7
mov word [rbx - 0x18], ax
add rbx, 0x28
lea rax, [rbx - 0x18]
cmp rax, r15
jne 0x140022cd4
mov r12, qword [rsp + 0x68]
mov rax, qword [rsp + 0x78]
sub rax, r12
sar rax, 3
imul rax, rsi
lea rdx, [rax + rax*4]
shl rdx, 3
mov rax, r12
cmp rdx, 0x1000
jb 0x140022d70
add rdx, 0x27
mov r12, qword [r12 - 8]
sub rax, r12
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022db0
mov rcx, r12
call fcn.140028ff4
movzx eax, dil
mov rbx, qword [rsp + 0x410]
add rsp, 0x3d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, rdi
call qword [0x140069018]
jmp 0x140022c94
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x140022c9c
call fcn.140031574
int3
cmp byte [rcx + 0x1c], 0
mov rdx, rcx
jne 0x14002793c
mov al, 1
ret
mov rdx, qword [rdx + 0x20]
add rcx, 0x28
jmp 0x140022190