Function at 0x1002bc10
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0x85c8]
mov dword [ebp - 8], ebx
mov eax, dword [ebx + 8]
mov ecx, eax
neg ecx
and ecx, 7
shl dword [ebx + 4], cl
add eax, ecx
mov edx, dword [ebx + 4]
mov ecx, 0x20
mov dword [ebx + 8], eax
sub ecx, eax
mov eax, dword [ebx + 0x14]
shl edx, cl
bswap edx
mov word [eax], dx
mov ecx, dword [ebx + 8]
mov eax, ecx
shr eax, 3
and ecx, 0xf
and eax, 2
mov dword [ebx + 8], ecx
add eax, dword [ebx + 0x14]
and eax, dword [ebx + 0xc]
mov dword [ebx + 0x14], eax
cmp dword [esi + 0x4c], 0
je 0x1002bdb0
mov eax, dword [esi + 0x4088]
inc eax
push eax
push str._n_d_horizontal_tiles:_n
call fcn.1000d600
add esp, 8
lea ebx, [esi + 0x408c]
xor edi, edi
nop dword [eax + eax]
push dword [ebx]
push edi
push str.____offset_of_tile__d_in_MBs:__d_n
call fcn.1000d600
inc edi
lea ebx, [ebx + 4]
add esp, 0xc
cmp edi, dword [esi + 0x4088]
jbe 0x1002bc90
mov eax, dword [esi + 0x84]
inc eax
push eax
push str._n_d_vertical_tiles:_n
call fcn.1000d600
add esp, 8
lea ebx, [esi + 0x88]
xor edi, edi
nop dword [eax]
push dword [ebx]
push edi
push str.____offset_of_tile__d_in_MBs:__d_n
call fcn.1000d600
inc edi
lea ebx, [ebx + 4]
add esp, 0xc
cmp edi, dword [esi + 0x84]
jbe 0x1002bcd0
cmp dword [esi + 0x68], 0
mov ecx, str._nSpatial_order_bitstream_n
mov eax, str._nFrequency_order_bitstream_n
cmove eax, ecx
push eax
call fcn.1000d600
add esp, 4
cmp dword [esi + 0x8560], 0
jne 0x1002bd21
push str._nstreaming_mode__no_index_table._n
call fcn.1000d600
add esp, 4
jmp 0x1002bdad
mov eax, dword [esi + 0x84]
xor ebx, ebx
cmp dword [esi + 0x68], ebx
jne 0x1002bd68
nop
xor edi, edi
lea ecx, [eax + 1]
mov eax, dword [esi + 0x85d8]
imul ecx, ebx
add ecx, edi
push dword [eax + ecx*4]
push edi
push ebx
push str.bitstream_size_for_tile___d___d_:__d._n
call fcn.1000d600
mov eax, dword [esi + 0x84]
inc edi
add esp, 0x10
cmp edi, eax
jbe 0x1002bd32
inc ebx
cmp ebx, dword [esi + 0x4088]
jbe 0x1002bd30
jmp 0x1002bdad
xor edi, edi
nop word [eax + eax]
inc eax
imul eax, ebx
add eax, edi
shl eax, 4
add eax, dword [esi + 0x85d8]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
push edi
push ebx
push str.bitstream_size_of__DC__LP__AC__FL__for_tile___d___d_:__d__d__d__d._n
call fcn.1000d600
mov eax, dword [esi + 0x84]
inc edi
add esp, 0x1c
cmp edi, eax
jbe 0x1002bd70
inc ebx
cmp ebx, dword [esi + 0x4088]
jbe 0x1002bd68
mov ebx, dword [ebp - 8]
mov ecx, esi
call fcn.1002b840
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
xor eax, edx
test eax, 0x1000
je 0x1002bdeb
mov eax, dword [ebx + 0x18]
push 0x1000
push edx
push eax
mov eax, dword [eax + 0x20]
call eax
add esp, 0xc
test eax, eax
js 0x1002be0f
mov edx, dword [ebx + 0x10]
add edx, 0x1000
and edx, dword [ebx + 0xc]
mov dword [ebx + 0x10], edx
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x18]
shr eax, 3
sub eax, edx
add eax, dword [ebx + 0x14]
push eax
mov eax, dword [ecx + 0x20]
push edx
push ecx
call eax
add esp, 0xc
test eax, eax
js 0x1002be0f
mov dword [ebx + 0x18], 0
cmp dword [esi + 0x85fc], 0
jbe 0x1002c136
mov eax, dword [esi + 0x7c]
xor ecx, ecx
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x85d8]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
mov eax, dword [esi + 0x85f8]
mov edi, dword [eax + ecx*4]
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
xor eax, edx
test eax, 0x1000
je 0x1002be6d
mov eax, dword [edi + 0x18]
push 0x1000
push edx
push eax
mov eax, dword [eax + 0x20]
call eax
add esp, 0xc
test eax, eax
js 0x1002be91
mov edx, dword [edi + 0x10]
add edx, 0x1000
and edx, dword [edi + 0xc]
mov dword [edi + 0x10], edx
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x18]
shr eax, 3
sub eax, edx
add eax, dword [edi + 0x14]
push eax
mov eax, dword [ecx + 0x20]
push edx
push ecx
call eax
add esp, 0xc
test eax, eax
js 0x1002be91
mov dword [edi + 0x18], 0
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi + 0x85fc]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, eax
jb 0x1002be30
xor edi, edi
test eax, eax
je 0x1002becd
nop dword [eax + eax]
mov eax, dword [esi + 0x8868]
push 0
mov eax, dword [eax + edi*4]
push eax
mov eax, dword [eax + 0x24]
call eax
inc edi
add esp, 8
cmp edi, dword [esi + 0x85fc]
jb 0x1002beb0
xor ecx, ecx
cmp dword [esi + 0x68], 1
mov dword [ebp - 0xc], ecx
jne 0x1002beea
cmp dword [esi + 0x8098], 0
je 0x1002beea
movzx eax, byte [esi + 0x85bc]
jmp 0x1002beef
mov eax, 1
cmp ecx, eax
jae 0x1002c020
mov dword [ebp - 0x10], 0
mov edi, ecx
xor ebx, ebx
cmp dword [esi + 0x68], 0
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 0x8868]
jne 0x1002bf28
push dword [eax + edi*4]
mov edx, dword [ebp - 4]
mov ecx, dword [ecx + ebx*4]
call fcn.1002bb30
add esp, 4
inc edi
jmp 0x1002bff7
mov edx, dword [eax + edi*4]
movzx eax, byte [esi + 0x85bc]
imul eax, ebx
cmp dword [esi + 0x8098], 0
push edx
mov edx, dword [ebp - 4]
jne 0x1002bfd8
mov ecx, dword [ecx + eax*4]
call fcn.1002bb30
mov al, byte [esi + 0x85bc]
add esp, 4
inc edi
cmp al, 1
jbe 0x1002bf7e
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
movzx eax, al
imul eax, ebx
push dword [ecx + edi*4]
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + eax*4 + 4]
call fcn.1002bb30
add esp, 4
inc edi
mov al, byte [esi + 0x85bc]
cmp al, 2
jbe 0x1002bfaa
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
movzx eax, al
imul eax, ebx
push dword [ecx + edi*4]
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + eax*4 + 8]
call fcn.1002bb30
add esp, 4
inc edi
mov al, byte [esi + 0x85bc]
cmp al, 3
jbe 0x1002bff7
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
movzx eax, al
imul eax, ebx
push dword [ecx + edi*4]
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + eax*4 + 0xc]
call fcn.1002bb30
add esp, 4
inc edi
jmp 0x1002bff7
mov ecx, dword [ebp - 0xc]
add ecx, eax
mov eax, dword [esi + 0x8868]
mov ecx, dword [eax + ecx*4]
call fcn.1002bb30
movzx eax, byte [esi + 0x85bc]
add esp, 4
add edi, eax
inc ebx
cmp ebx, dword [esi + 0x84]
jbe 0x1002bf02
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [esi + 0x4088]
jbe 0x1002bf00
mov ecx, dword [ebp - 0xc]
inc ecx
jmp 0x1002becf
mov eax, dword [esi + 0x8620]
xor edi, edi
imul eax, dword [esi + 0x861c]
mov ecx, dword [esi + 0x85fc]
imul eax, dword [esi + 0x6c]
cmp eax, 0x4000000
jb 0x1002c0df
test ecx, ecx
je 0x1002c0bf
nop dword [eax + eax]
mov eax, dword [esi + 0x8868]
test eax, eax
je 0x1002c09b
mov eax, dword [eax + edi*4]
test eax, eax
je 0x1002c09b
mov eax, dword [eax]
test eax, eax
je 0x1002c084
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [esi + 0x886c]
add esp, 4
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x1002c0d5
mov eax, dword [esi + 0x8868]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x1002c09b
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [esi + 0x886c]
test eax, eax
je 0x1002c0b6
mov eax, dword [eax + edi*4]
test eax, eax
je 0x1002c0b6
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
inc edi
cmp edi, dword [esi + 0x85fc]
jb 0x1002c050
mov eax, dword [esi + 0x886c]
test eax, eax
je 0x1002c109
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x1002c109
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x1002c109
mov eax, dword [esi + 0x8868]
test eax, eax
je 0x1002c100
mov ecx, dword [eax + edi*4]
lea eax, [eax + edi*4]
test ecx, ecx
je 0x1002c100
push eax
mov eax, dword [ecx + 0x14]
call eax
add esp, 4
inc edi
cmp edi, dword [esi + 0x85fc]
jb 0x1002c0e3
push dword [esi + 0x8868]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esi + 0x85f8]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esi + 0x85d8]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret