Function at 0x687d80
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0x85c8]
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0x14]
neg ecx
and ecx, 7
shl dword [ebx + 4], cl
add dword [ebx + 8], ecx
mov edx, dword [ebx + 4]
mov ecx, 0x20
sub ecx, dword [ebx + 8]
shl edx, cl
bswap edx
mov word [eax], dx
mov ecx, dword [ebx + 8]
mov eax, ecx
shr eax, 3
and eax, 2
add eax, dword [ebx + 0x14]
and ecx, 0xf
and eax, dword [ebx + 0xc]
mov dword [ebx + 8], ecx
mov dword [ebx + 0x14], eax
cmp dword [esi + 0x4c], 0
je 0x687f10
mov eax, dword [esi + 0x4088]
inc eax
push eax
push str._n_d_horizontal_tiles:_n
call fcn.0064ec14
add esp, 8
xor edi, edi
lea ebx, [esi + 0x408c]
push dword [ebx]
push edi
push 0x7762d8
call fcn.0064ec14
inc edi
add esp, 0xc
lea ebx, [ebx + 4]
cmp edi, dword [esi + 0x4088]
jbe 0x687df8
mov eax, dword [esi + 0x84]
inc eax
push eax
push str._n_d_vertical_tiles:_n
call fcn.0064ec14
add esp, 8
xor edi, edi
lea ebx, [esi + 0x88]
push dword [ebx]
push edi
push str.____offset_of_tile__d_in_MBs:__d_n
call fcn.0064ec14
inc edi
add esp, 0xc
lea ebx, [ebx + 4]
cmp edi, dword [esi + 0x84]
jbe 0x687e31
cmp dword [esi + 0x68], 0
jne 0x687e5a
push str._nSpatial_order_bitstream_n
jmp 0x687e5f
push str._nFrequency_order_bitstream_n
call fcn.0064ec14
add esp, 4
cmp dword [esi + 0x8560], 0
jne 0x687e82
push str._nstreaming_mode__no_index_table._n
call fcn.0064ec14
add esp, 4
jmp 0x687f0d
mov eax, dword [esi + 0x84]
xor ebx, ebx
cmp dword [esi + 0x68], ebx
jne 0x687ec8
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.0064ec14
mov eax, dword [esi + 0x84]
inc edi
add esp, 0x10
cmp edi, eax
jbe 0x687e92
inc ebx
cmp ebx, dword [esi + 0x4088]
jbe 0x687e90
jmp 0x687f0d
xor edi, edi
lea ebx, [ebx]
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.0064ec14
mov eax, dword [esi + 0x84]
inc edi
add esp, 0x1c
cmp edi, eax
jbe 0x687ed0
inc ebx
cmp ebx, dword [esi + 0x4088]
jbe 0x687ec8
mov ebx, dword [ebp - 0xc]
mov ecx, esi
call fcn.006870a0
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
xor eax, ecx
test eax, 0x1000
je 0x687f4a
mov eax, dword [ebx + 0x18]
push 0x1000
push ecx
push eax
mov eax, dword [eax + 0x20]
call eax
add esp, 0xc
test eax, eax
js 0x687f71
mov eax, dword [ebx + 0x10]
add eax, 0x1000
and eax, dword [ebx + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x18]
shr eax, 3
sub eax, ecx
add eax, dword [ebx + 0x14]
push eax
mov eax, dword [edx + 0x20]
push ecx
push edx
call eax
add esp, 0xc
test eax, eax
js 0x687f71
mov dword [ebx + 0x18], 0
mov ecx, dword [esi + 0x85fc]
test ecx, ecx
je 0x68828a
mov eax, dword [esi + 0x7c]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x85d8]
xor ebx, ebx
mov dword [ebp - 4], eax
test ecx, ecx
je 0x688000
mov eax, dword [esi + 0x85f8]
mov edi, dword [eax + ebx*4]
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 0x14]
xor eax, ecx
test eax, 0x1000
je 0x687fd0
mov eax, dword [edi + 0x18]
push 0x1000
push ecx
push eax
mov eax, dword [eax + 0x20]
call eax
add esp, 0xc
test eax, eax
js 0x687ff7
mov eax, dword [edi + 0x10]
add eax, 0x1000
and eax, dword [edi + 0xc]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x18]
shr eax, 3
sub eax, ecx
add eax, dword [edi + 0x14]
push eax
mov eax, dword [edx + 0x20]
push ecx
push edx
call eax
add esp, 0xc
test eax, eax
js 0x687ff7
mov dword [edi + 0x18], 0
inc ebx
cmp ebx, dword [esi + 0x85fc]
jb 0x687f94
xor edi, edi
cmp dword [esi + 0x85fc], edi
jbe 0x68802d
lea ebx, [ebx]
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 0x688010
xor ecx, ecx
cmp dword [esi + 0x68], 1
mov dword [ebp - 0xc], ecx
jne 0x68804a
cmp dword [esi + 0x8098], 0
je 0x68804a
movzx eax, byte [esi + 0x85bc]
jmp 0x68804f
mov eax, 1
cmp ecx, eax
jae 0x68817d
mov dword [ebp - 0x10], 0
mov edi, ecx
xor ebx, ebx
cmp dword [esi + 0x68], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [eax + edi*4]
jne 0x688088
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + ebx*4]
call fcn.006873a0
add esp, 4
inc edi
jmp 0x688154
movzx eax, byte [esi + 0x85bc]
imul eax, ebx
cmp dword [esi + 0x8098], 0
jne 0x688138
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + eax*4]
call fcn.006873a0
mov cl, byte [esi + 0x85bc]
add esp, 4
inc edi
cmp cl, 1
jbe 0x6880de
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [eax + edi*4]
movzx eax, cl
mov ecx, dword [esi + 0x8868]
imul eax, ebx
mov ecx, dword [ecx + eax*4 + 4]
call fcn.006873a0
add esp, 4
inc edi
mov al, byte [esi + 0x85bc]
cmp al, 2
jbe 0x68810a
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [ecx + edi*4]
mov ecx, dword [esi + 0x8868]
movzx eax, al
imul eax, ebx
mov ecx, dword [ecx + eax*4 + 8]
call fcn.006873a0
add esp, 4
inc edi
mov al, byte [esi + 0x85bc]
cmp al, 3
jbe 0x688154
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [ecx + edi*4]
mov ecx, dword [esi + 0x8868]
movzx eax, al
imul eax, ebx
mov ecx, dword [ecx + eax*4 + 0xc]
call fcn.006873a0
add esp, 4
inc edi
jmp 0x688154
add eax, ecx
mov ecx, dword [esi + 0x8868]
mov ecx, dword [ecx + eax*4]
call fcn.006873a0
movzx eax, byte [esi + 0x85bc]
add esp, 4
add edi, eax
mov ecx, dword [ebp - 0xc]
inc ebx
cmp ebx, dword [esi + 0x84]
jbe 0x688062
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [esi + 0x4088]
jbe 0x688060
inc ecx
jmp 0x68802f
mov eax, dword [esi + 0x8620]
imul eax, dword [esi + 0x861c]
imul eax, dword [esi + 0x6c]
xor edi, edi
cmp eax, 0x4000000
jb 0x688237
cmp dword [esi + 0x85fc], edi
jbe 0x688218
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea esp, [esp]
mov eax, dword [esi + 0x8868]
test eax, eax
je 0x6881f5
mov eax, dword [eax + edi*4]
test eax, eax
je 0x6881f5
mov eax, dword [eax]
test eax, eax
je 0x6881df
push eax
call fcn.00635c3e
mov eax, dword [esi + 0x886c]
add esp, 4
push dword [eax + edi*4]
call ebx
test eax, eax
je 0x68822d
mov eax, dword [esi + 0x8868]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x6881f5
push eax
call fcn.00634402
add esp, 4
mov eax, dword [esi + 0x886c]
test eax, eax
je 0x68820f
mov eax, dword [eax + edi*4]
test eax, eax
je 0x68820f
push eax
call fcn.00634402
add esp, 4
inc edi
cmp edi, dword [esi + 0x85fc]
jb 0x6881b0
mov eax, dword [esi + 0x886c]
test eax, eax
je 0x688266
push eax
call fcn.00634402
add esp, 4
jmp 0x688266
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x85fc], edi
jbe 0x688266
nop
mov eax, dword [esi + 0x8868]
test eax, eax
je 0x68825d
mov ecx, dword [eax + edi*4]
lea eax, [eax + edi*4]
test ecx, ecx
je 0x68825d
push eax
mov eax, dword [ecx + 0x14]
call eax
add esp, 4
inc edi
cmp edi, dword [esi + 0x85fc]
jb 0x688240
push dword [esi + 0x8868]
call fcn.00634402
push dword [esi + 0x85f8]
call fcn.00634402
push dword [esi + 0x85d8]
call fcn.00634402
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret