Function at 0x140021dc0
Capabilities:
Delete file

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r15
sub rsp, 0x40
mov rbp, qword [rcx + 0x8648]
mov rbx, rcx
xor edx, edx
mov r8d, dword [rbp + 8]
mov rcx, rbp
neg r8d
and r8d, 7
call fcn.14000e880
xor r15d, r15d
cmp dword [rbx + 0x80], r15d
je 0x140021f75
mov edx, dword [rbx + 0x40cc]
lea rcx, str._n_d_horizontal_tiles:_n
inc edx
call fcn.1401bdc60
mov edi, r15d
mov eax, edi
lea rcx, str.____offset_of_tile__d_in_MBs:__d_n
mov edx, edi
mov r8d, dword [rbx + rax*4 + 0x40d0]
call fcn.1401bdc60
inc edi
cmp edi, dword [rbx + 0x40cc]
jbe 0x140021e11
mov edx, dword [rbx + 0xc8]
lea rcx, str._n_d_vertical_tiles:_n
inc edx
call fcn.1401bdc60
mov edi, r15d
nop word [rax + rax]
mov eax, edi
lea rcx, str.____offset_of_tile__d_in_MBs:__d_n
mov edx, edi
mov r8d, dword [rbx + rax*4 + 0xcc]
call fcn.1401bdc60
inc edi
cmp edi, dword [rbx + 0xc8]
jbe 0x140021e50
lea rcx, str._nSpatial_order_bitstream_n
cmp dword [rbx + 0x9c], r15d
je 0x140021e89
lea rcx, str._nFrequency_order_bitstream_n
call fcn.1401bdc60
cmp dword [rbx + 0x85c0], r15d
jne 0x140021ea8
lea rcx, str._nstreaming_mode__no_index_table._n
call fcn.1401bdc60
jmp 0x140021f75
mov eax, dword [rbx + 0xc8]
mov esi, r15d
cmp dword [rbx + 0x9c], r15d
jne 0x140021f10
nop word [rax + rax]
mov edi, r15d
nop dword [rax]
nop word [rax + rax]
lea ecx, [rax + 1]
mov rax, qword [rbx + 0x8668]
mov r8d, edi
mov edx, esi
imul ecx, esi
add ecx, edi
mov r9d, dword [rax + rcx*8]
lea rcx, str.bitstream_size_for_tile___d___d_:__d._n
call fcn.1401bdc60
mov eax, dword [rbx + 0xc8]
inc edi
cmp edi, eax
jbe 0x140021ed0
inc esi
cmp esi, dword [rbx + 0x40cc]
jbe 0x140021ec0
jmp 0x140021f75
mov edi, r15d
nop dword [rax]
nop word [rax + rax]
lea ecx, [rax + 1]
mov rax, qword [rbx + 0x8668]
mov r8d, edi
imul ecx, esi
add ecx, edi
shl ecx, 2
lea rdx, [rax + rcx*8]
lea rcx, str.bitstream_size_of__DC__LP__AC__FL__for_tile___d___d_:__d__d__d__d._n
mov eax, dword [rdx + 0x18]
mov r9d, dword [rdx]
mov dword [rsp + 0x30], eax
mov eax, dword [rdx + 0x10]
mov dword [rsp + 0x28], eax
mov eax, dword [rdx + 8]
mov edx, esi
mov dword [rsp + 0x20], eax
call fcn.1401bdc60
mov eax, dword [rbx + 0xc8]
inc edi
cmp edi, eax
jbe 0x140021f20
inc esi
cmp esi, dword [rbx + 0x40cc]
jbe 0x140021f10
mov rcx, rbx
call fcn.140021960
mov rdx, rbp
call fcn.14000ec50
mov rax, qword [rbx + 0x86a0]
test rax, rax
je 0x1400222ac
mov rbp, qword [rbx + 0xb8]
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x80], r14
mov r14, qword [rbx + 0x8668]
mov rdi, r15
nop dword [rax + rax]
mov rdx, qword [rbx + 0x8698]
mov rdx, qword [rdx + rdi*8]
call fcn.14000ec50
inc rdi
cmp rdi, qword [rbx + 0x86a0]
jb 0x140021fc0
mov rdi, r15
cmp qword [rbx + 0x86a0], r15
jbe 0x140022010
nop dword [rax + rax]
mov rax, qword [rbx + 0x8b48]
xor edx, edx
mov r8, qword [rax + rdi*8]
mov rcx, r8
call qword [r8 + 0x48]
inc rdi
cmp rdi, qword [rbx + 0x86a0]
jb 0x140021ff0
mov r12, r15
cmp dword [rbx + 0x9c], 1
jne 0x14002202e
cmp dword [rbx + 0x80dc], r15d
je 0x14002202e
movzx eax, byte [rbx + 0x8638]
jmp 0x140022033
mov eax, 1
cdqe
cmp r12, rax
jae 0x140022177
mov r13, r15
mov rdi, r12
nop dword [rax]
nop dword [rax + rax]
mov rsi, r15
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx + 0x8b48]
mov r8, qword [r14 + rdi*8]
mov rdx, rbp
cmp dword [rbx + 0x9c], r15d
jne 0x140022088
mov rcx, qword [rcx + rsi*8]
call fcn.140021ce0
inc rdi
jmp 0x14002214b
movzx eax, byte [rbx + 0x8638]
imul rax, rsi
cmp dword [rbx + 0x80dc], r15d
jne 0x140022135
mov rcx, qword [rcx + rax*8]
call fcn.140021ce0
movzx eax, byte [rbx + 0x8638]
inc rdi
cmp al, 1
jbe 0x1400220d9
mov rcx, qword [rbx + 0x8b48]
mov r8, qword [r14 + rdi*8]
movzx eax, al
imul rax, rsi
mov rcx, qword [rcx + rax*8 + 8]
mov rdx, rbp
call fcn.140021ce0
inc rdi
movzx eax, byte [rbx + 0x8638]
cmp al, 2
jbe 0x140022106
mov rcx, qword [rbx + 0x8b48]
mov r8, qword [r14 + rdi*8]
movzx eax, al
imul rax, rsi
mov rcx, qword [rcx + rax*8 + 0x10]
mov rdx, rbp
call fcn.140021ce0
inc rdi
movzx eax, byte [rbx + 0x8638]
cmp al, 3
jbe 0x14002214b
mov rcx, qword [rbx + 0x8b48]
mov r8, qword [r14 + rdi*8]
movzx eax, al
imul rax, rsi
mov rcx, qword [rcx + rax*8 + 0x18]
mov rdx, rbp
call fcn.140021ce0
inc rdi
jmp 0x14002214b
add rax, r12
mov rcx, qword [rcx + rax*8]
call fcn.140021ce0
movzx eax, byte [rbx + 0x8638]
add rdi, rax
mov eax, dword [rbx + 0xc8]
inc rsi
cmp rsi, rax
jbe 0x140022060
mov eax, dword [rbx + 0x40cc]
inc r13
cmp r13, rax
jbe 0x140022050
inc r12
jmp 0x140022013
mov rax, qword [rbx + 0x86e8]
mov r14, qword [rsp + 0x80]
mov r13, qword [rsp + 0x78]
imul rax, qword [rbx + 0x86e0]
mov r12, qword [rsp + 0x70]
imul rax, qword [rbx + 0xa0]
cmp rax, 0x4000000
jb 0x140022253
cmp qword [rbx + 0x86a0], r15
jbe 0x140022232
nop word [rax + rax]
mov rax, qword [rbx + 0x8b48]
test rax, rax
je 0x14002220c
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x14002220c
mov rcx, qword [rcx]
test rcx, rcx
je 0x1400221f7
call fcn.1401be6a4
mov rcx, qword [rbx + 0x8b50]
mov rcx, qword [rcx + r15*8]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140022245
mov rax, qword [rbx + 0x8b48]
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x14002220c
call fcn.1401be23c
mov rax, qword [rbx + 0x8b50]
test rax, rax
je 0x140022226
mov rcx, qword [rax + r15*8]
test rcx, rcx
je 0x140022226
call fcn.1401be23c
inc r15
cmp r15, qword [rbx + 0x86a0]
jb 0x1400221c0
mov rcx, qword [rbx + 0x8b50]
test rcx, rcx
je 0x140022288
call fcn.1401be23c
jmp 0x140022288
or eax, 0xffffffff
add rsp, 0x40
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp qword [rbx + 0x86a0], r15
jbe 0x140022288
nop dword [rax]
mov rax, qword [rbx + 0x8b48]
test rax, rax
je 0x14002227c
lea rcx, [rax + r15*8]
mov rax, qword [rax + r15*8]
test rax, rax
je 0x14002227c
call qword [rax + 0x28]
inc r15
cmp r15, qword [rbx + 0x86a0]
jb 0x140022260
mov rcx, qword [rbx + 0x8b48]
call fcn.1401be23c
mov rcx, qword [rbx + 0x8698]
call fcn.1401be23c
mov rcx, qword [rbx + 0x8668]
call fcn.1401be23c
xor eax, eax
add rsp, 0x40
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret