Function at 0x100044e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x948], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
mov esi, ecx
lea ecx, [esp + 0x5c]
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], 1
mov dword [esp + 0x60], ebx
mov dword [esp + 0x18], ecx
mov edi, 0x1000ba40
cmp dword [0x10045288], ebx
jne 0x10004545
call fcn.1002dc60
or eax, 0x80000000
mov dword [0x10045288], eax
mov dword [0x100452c0], eax
test byte [0x100452c0], 0x20
mov eax, 0x1003ef38
je 0x10004558
mov eax, 0x1003ef28
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [0x10045054], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [0x10045058], ecx
lea ecx, [esp + 0x7d0]
mov dword [0x1004505c], edx
lea edx, [esp + 0x850]
mov dword [0x10045060], eax
mov dword [esp + 0x7a0], ebx
mov dword [esp + 0x7a4], ebx
mov dword [esp + 0x7a8], ebx
mov ebx, dword [ebp + 0xc]
mov eax, ecx
mov dword [esp + 0x790], ecx
mov ecx, edx
mov dword [esp + 0x798], edx
mov dword [esp + 0x794], eax
mov dword [esp + 0x79c], ecx
mov dword [esp + 0x7ac], 0x20
test ebx, 0x4000
je 0x100045e1
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
push 0x600
lea ecx, [esp + 0x194]
push 0
push ecx
call fcn.10032ac0
add esp, 0xc
call sym.bink2w32.dll__RADTimerRead_0
mov dword [esp + 0x73c], eax
mov eax, ebx
and eax, 0x4000000
mov byte [0x10044d78], 0
mov dword [esp + 0x28], eax
je 0x1000462c
mov esi, dword [esp + 0x10]
mov ecx, 0xb
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
jmp 0x1000474b
test ebx, 0x2000000
je 0x1000463d
mov eax, dword [esi + 0x24]
test eax, eax
je 0x1000463d
mov edi, eax
test edi, edi
jne 0x10004662
push 0x10034d84
call sym.bink2w32.dll__BinkSetError_4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x948]
xor ecx, esp
call fcn.100329a0
mov esp, ebp
pop ebp
ret
push 0x140
lea edx, [esp + 0x354]
push 0
push edx
call fcn.10032ac0
add esp, 0xc
mov dword [esp + 0x384], 0x10003f90
mov dword [esp + 0x38c], 0x10003fa0
mov dword [esp + 0x390], 0x10003fc0
call fcn.100012b0
test bl, 0x20
je 0x100046b7
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0x230], eax
mov dword [esp + 0x234], ecx
mov edx, dword [0x10045100]
test edx, edx
je 0x100046c6
call fcn.100016d0
mov eax, dword [esp + 0x10]
push ebx
push eax
lea ecx, [esp + 0x358]
push ecx
call edi
test eax, eax
jne 0x1000471c
mov edx, dword [0x10045100]
test edx, edx
je 0x100046ee
mov eax, 0x10044cf8
call fcn.1002bd60
cmp byte [0x10044d78], 0
jne 0x100058ef
push str.Error_opening_file.
call sym.bink2w32.dll__BinkSetError_4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x948]
xor ecx, esp
call fcn.100329a0
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10045100]
test eax, eax
je 0x1000472f
mov eax, 0x10044cf8
call fcn.1002bd60
push 0
push 0x2c
lea ecx, [esp + 0x3c]
push ecx
push 0
push 0
lea edx, [esp + 0x364]
push edx
call dword [esp + 0x368]
cmp dword [esp + 0x4c], 0
jge 0x1000475a
add dword [esp + 0x4c], 0x7f000000
mov eax, dword [esp + 0x34]
call fcn.1002b290
test eax, eax
je 0x1000586f
mov eax, dword [esp + 0x3c8]
test eax, eax
jne 0x1000586f
mov ecx, dword [esp + 0x3c]
and dword [esp + 0x5c], 0xbfffffff
test ecx, ecx
jne 0x10004794
push str.The_file_doesnt_contain_any_compressed_frames_yet.
jmp 0x10005874
mov eax, dword [esp + 0x48]
test eax, eax
jge 0x100047a2
neg eax
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x44]
cmp edx, ecx
jb 0x10005868
cmp edx, 0xf4240
ja 0x10005868
cmp dword [esp + 0x5c], 0x100
ja 0x10005868
cmp eax, 0x7fff
ja 0x10005868
mov ecx, dword [esp + 0x4c]
cmp ecx, 0x7fff
ja 0x10005868
mov ebx, dword [esp + 0x50]
test ebx, ebx
je 0x10005868
mov edi, dword [esp + 0x54]
test edi, edi
je 0x10005868
mov esi, dword [esp + 0x34]
mov dword [esp + 0x190], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x194], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x298], esi
mov dword [esp + 0x1b4], ecx
test eax, 0x100
je 0x10004836
and eax, 0xfffffeff
or eax, 0x400
mov dword [ebp + 0xc], eax
mov edx, ecx
and edx, 0x20013
or edx, eax
mov dword [esp + 0x1b0], edx
test ecx, 0x100000
jne 0x1000485c
and edx, 0xffefffff
mov dword [esp + 0x1b0], edx
mov eax, esi
call fcn.1002b230
test eax, eax
jne 0x1000486f
cmp esi, 0x6b4b4942
jne 0x10004892
mov eax, ecx
shr eax, 0x18
lea eax, [eax*4 + 4]
mov dword [esp + 0x784], eax
test ecx, 0x10000
je 0x10004892
add dword [esp + 0x784], 0x18
cmp esi, 0x664b4942
je 0x100048aa
cmp esi, 0x674b4942
je 0x100048aa
cmp esi, 0x684b4942
jne 0x100048b7
or edx, 0x8000
mov dword [esp + 0x1b0], edx
test dword [ebp + 0xc], 0x1000
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x198], ecx
mov dword [esp + 0x6f8], edx
je 0x100048f9
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x10]
cmp eax, 0xffffffff
je 0x100048f9
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0x14]
mov dword [esp + 0x1a4], eax
mov dword [esp + 0x1a8], edx
jmp 0x10004907
mov dword [esp + 0x1a4], ebx
mov dword [esp + 0x1a8], edi
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x250], eax
mov eax, edi
shr eax, 1
mov dword [esp + 0x1b8], edx
add eax, ebx
xor edx, edx
div edi
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x740], ebx
mov dword [esp + 0x744], edi
mov dword [esp + 0x254], 0
mov dword [esp + 0x1c8], ecx
mov dword [esp + 0x6f0], eax
test eax, eax
jne 0x10004962
mov eax, 1
mov dword [esp + 0x6f0], eax
add eax, eax
push 0
add eax, eax
push eax
lea ecx, [esp + 0x6dc]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6e0]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6e4]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6e8]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6ec]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6f0]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov edx, dword [esp + 0x6f0]
push 0
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x6f4]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov eax, dword [esp + 0x34]
call fcn.1002b250
test eax, eax
je 0x10004aa8
mov edx, dword [esp + 0x1b0]
mov ecx, dword [esp + 0x190]
and edx, 3
movzx eax, byte [edx + 0x1003ef58]
add ecx, 0x1f
dec eax
shr ecx, 5
imul eax, ecx
lea edx, [eax*4 + 4]
push 0
push edx
lea eax, [esp + 0x780]
push eax
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov esi, dword [esp + 0x14]
mov eax, esi
test esi, esi
jne 0x10004ab7
mov eax, 1
lea ecx, [eax + eax*2]
push 0
shl ecx, 7
push ecx
lea edx, [esp + 0x31c]
push edx
lea ecx, [esp + 0x79c]
call fcn.1002db40
push 0
lea eax, [esi*4]
push eax
lea ecx, [esp + 0x254]
push ecx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov eax, dword [esp + 0x34]
call fcn.1002b1e0
test eax, eax
je 0x10004b18
mov ecx, dword [esp + 0x190]
add ecx, 0xf
and ecx, 0xfffffff0
lea eax, [esp + 0x2f0]
call fcn.100289c0
mov eax, dword [ebp + 0xc]
and eax, 0x4000000
mov dword [esp + 0x28], eax
push 0
jne 0x10004b6b
mov edx, dword [esp + 0x788]
push edx
lea eax, [esp + 0x788]
push eax
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov eax, dword [esp + 0x1c8]
mov edx, dword [esp + 0x6f8]
lea ecx, [eax + eax*2 + 0x42]
lea eax, [edx*8]
lea ecx, [eax + ecx*4]
push 0
lea edx, [esp + 0x334]
jmp 0x10004b80
mov eax, dword [esp + 0x6fc]
lea ecx, [eax*8 + 8]
lea edx, [esp + 0x320]
push ecx
push edx
lea ecx, [esp + 0x79c]
call fcn.1002db40
push 0
push 0x700
lea edx, [esp + 0x198]
mov esi, ecx
call fcn.100011a0
add esp, 8
test eax, eax
jne 0x10004bb4
push str.Out_of_memory.
jmp 0x10005874
lea ebx, [eax + 0x100]
and ebx, 0xffffff00
mov ecx, ebx
sub ecx, eax
cmp dword [esp + 0x28], 0
mov dword [ebx - 4], ecx
mov ecx, 0x180
lea esi, [esp + 0x190]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x548]
mov dword [ebx + 0x1dc], ebx
mov dword [edx], 0
mov eax, dword [ebx + 0x54c]
mov dword [eax], 0
mov ecx, dword [ebx + 0x550]
mov dword [ecx], 0
mov edx, dword [ebx + 0x554]
mov dword [edx], 0
mov eax, dword [ebx + 0x558]
mov dword [eax], 0
mov ecx, dword [ebx + 0x55c]
mov dword [ecx], 0
je 0x10004ccb
mov edx, dword [esp + 0x10]
lea eax, [edx + 0x2c]
mov dword [ebx + 0x5f0], eax
mov eax, dword [ebx + 0x5f4]
lea ecx, [edx + eax + 0x2c]
mov dword [ebx + 0x1a0], ecx
mov ecx, dword [ebx + 0x38]
lea esi, [edx + ecx*4 + 0x2c]
add esi, eax
mov dword [ebx + 0x1a4], esi
lea esi, [edx + ecx*8]
lea ecx, [ecx + ecx*2]
lea esi, [esi + eax + 0x2c]
lea edx, [edx + ecx*4]
lea eax, [edx + eax + 0x2c]
mov dword [ebx + 0x1a8], esi
mov dword [esp + 0x30], eax
test dword [esp + 0x58], 0x10000
je 0x10004e9e
mov ecx, dword [ebx + 0x5f0]
add dword [ebx + 0x5f4], 0xffffffe8
xorps xmm1, xmm1
movss xmm2, dword [0x100397c8]
lea edx, [ecx + 0x18]
mov dword [ebx + 0x5f0], edx
mov edx, 0xfffffffe
lea eax, [ebx + 0x64]
mov edi, edi
lea edi, [edx - 2]
and edi, 3
mov dword [esp + 0x64], edi
cmp edi, 3
jne 0x10004d8c
movaps xmm0, xmm1
jmp 0x10004d9a
mov ecx, dword [ebx + 0x5f4]
test ecx, ecx
je 0x10004cf2
mov edx, dword [ebx + 0x1c0]
push 0
push ecx
mov ecx, dword [ebx + 0x5f0]
push ecx
push 0xffffffffffffffff
lea eax, [ebx + 0x1c0]
push 0xffffffffffffffff
push eax
call edx
mov eax, dword [ebx + 0x1a0]
add eax, 0x100
and eax, 0xffffff80
add eax, 0xffffffac
mov dword [ebx + 0x1a0], eax
mov edx, dword [esp + 0x1c8]
mov esi, dword [esp + 0x6f8]
lea esi, [esi + edx*2]
push 0
add esi, edx
lea edx, [esi*4 + 4]
push edx
push eax
mov eax, dword [ebx + 0x1c0]
push 0xffffffffffffffff
lea ecx, [ebx + 0x1c0]
push 0xffffffffffffffff
push ecx
call eax
mov edx, dword [esp + 0x1c8]
mov ecx, dword [ebx + 0x1a0]
lea eax, [ecx + edx*4]
mov dword [ebx + 0x1a4], eax
mov ecx, dword [esp + 0x1c8]
lea eax, [eax + ecx*4]
mov dword [ebx + 0x1a8], eax
mov edx, dword [esp + 0x1c8]
lea eax, [eax + edx*4]
mov dword [esp + 0x30], eax
mov dword [ebx + 0x18c], eax
mov eax, dword [ebx + 0x238]
test eax, eax
je 0x10004c77
push str.Error_reading_Bink_header.
jmp 0x100051e1
movsx esi, word [ecx]
cvtsi2ss xmm0, esi
mulss xmm0, xmm2
add ecx, 2
lea esi, [edx - 1]
and esi, 3
movss dword [eax - 4], xmm0
mov dword [esp + 0x2c], esi
cmp esi, 3
jne 0x10004db3
movaps xmm0, xmm1
jmp 0x10004dc1
movsx esi, word [ecx]
cvtsi2ss xmm0, esi
mulss xmm0, xmm2
add ecx, 2
mov esi, edx
and esi, 3
movss dword [eax], xmm0
mov dword [esp + 0x20], esi
cmp esi, 3
jne 0x10004dd8
movaps xmm0, xmm1
jmp 0x10004de6
movsx esi, word [ecx]
cvtsi2ss xmm0, esi
mulss xmm0, xmm2
add ecx, 2
lea esi, [edx + 1]
and esi, 3
movss dword [eax + 4], xmm0
cmp esi, 3
jne 0x10004dfb
movaps xmm0, xmm1
jmp 0x10004e0d
movsx edi, word [ecx]
cvtsi2ss xmm0, edi
mov edi, dword [esp + 0x64]
mulss xmm0, xmm2
add ecx, 2
movss dword [eax + 8], xmm0
cmp edi, 3
jne 0x10004e1c
movaps xmm0, xmm1
jmp 0x10004e2a
movsx edi, word [ecx]
cvtsi2ss xmm0, edi
mulss xmm0, xmm2
add ecx, 2
cmp dword [esp + 0x2c], 3
movss dword [eax + 0xc], xmm0
jne 0x10004e3b
movaps xmm0, xmm1
jmp 0x10004e49
movsx edi, word [ecx]
cvtsi2ss xmm0, edi
mulss xmm0, xmm2
add ecx, 2
cmp dword [esp + 0x20], 3
movss dword [eax + 0x10], xmm0
jne 0x10004e5a
movaps xmm0, xmm1
jmp 0x10004e68
movsx edi, word [ecx]
cvtsi2ss xmm0, edi
mulss xmm0, xmm2
add ecx, 2
movss dword [eax + 0x14], xmm0
cmp esi, 3
jne 0x10004e77
movaps xmm0, xmm1
jmp 0x10004e85
movsx esi, word [ecx]
cvtsi2ss xmm0, esi
mulss xmm0, xmm2
add ecx, 2
add edx, 8
movss dword [eax + 0x18], xmm0
lea esi, [edx + 2]
add eax, 0x20
cmp esi, 0x10
jl 0x10004cb0
jmp 0x10004ef5
test byte [ebx + 0x20], 0x10
mov esi, 0x10034d38
jne 0x10004eae
mov esi, 0x10034cf8
lea edx, [ebx + 0x60]
mov ecx, 0x10
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x34]
call fcn.1002b210
test eax, eax
je 0x10004ef5
movss xmm0, dword [edx]
fld dword [ebx + 0x70]
fstp dword [edx]
movss dword [ebx + 0x70], xmm0
movss xmm0, dword [ebx + 0x64]
fld dword [ebx + 0x74]
fstp dword [ebx + 0x64]
movss dword [ebx + 0x74], xmm0
fld dword [ebx + 0x78]
movss xmm0, dword [ebx + 0x68]
fstp dword [ebx + 0x68]
movss dword [ebx + 0x78], xmm0
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebx + 0x108]
push edx
mov edx, dword [ebx + 4]
lea eax, [ebx + 0x120]
push ecx
call 0x10021f80
mov ecx, dword [ebx + 0x560]
add esp, 0xc
lea eax, [ebx + 0xc0]
push eax
lea edx, [ebx + 0x19c]
push edx
mov edx, dword [esp + 0x38]
lea eax, [ebx + 0x1b8]
push eax
mov eax, dword [ebx + 8]
push ecx
mov ecx, dword [ebx + 0x18c]
push edx
push eax
call fcn.10003d10
mov ecx, eax
and ecx, edx
add esp, 0x18
mov dword [ebx + 0xa8], eax
mov dword [ebx + 0xac], edx
cmp ecx, 0xffffffff
jne 0x10004f66
push str.This_file_has_bad_frame_size_data.
jmp 0x100051e1
mov esi, dword [ebp + 0xc]
test esi, 0x400
jne 0x10004fab
lea edx, [esp + 0x68]
push edx
push ebx
call sym.bink2w32.dll__BinkGetFrameBuffersInfo_8
push 0
lea eax, [esp + 0x6c]
push eax
push ebx
call sym.bink2w32.dll__BinkAllocateFrameBuffers_12
test eax, eax
je 0x100051dc
mov edi, dword [ebx + 0x5e4]
mov ecx, 0x2a
lea esi, [esp + 0x68]
mov dword [ebx + 0xb0], edi
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0xc]
mov edx, dword [esp + 0xc]
test esi, 0x1000000
je 0x10004fda
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0xc]
mov edi, eax
and edi, ecx
cmp edi, 0xffffffff
je 0x10004fda
mov edi, eax
or edi, ecx
je 0x10004fda
mov dword [ebx + 0xc8], eax
mov dword [ebx + 0xcc], ecx
jmp 0x10004ff2
mov ecx, dword [ebx + 0xa8]
mov eax, dword [ebx + 0xac]
mov dword [ebx + 0xc8], ecx
mov dword [ebx + 0xcc], eax
test esi, 0x400000
je 0x10005006
mov eax, dword [edx + 0x18]
cmp eax, 0xffffffff
je 0x10005006
test eax, eax
jne 0x10005008
xor eax, eax
cmp dword [esp + 0x28], 0
mov dword [esp + 0xc], eax
mov dword [ebx + 0x1b0], eax
je 0x1000503a
mov ecx, dword [ebx + 0x18c]
mov edx, dword [ecx]
and edx, 0xfffffffc
add edx, dword [esp + 0x10]
or dword [ebx + 0x20], 0x8000000
mov dword [ebx + 0x1ac], edx
jmp 0x10005227
mov eax, dword [ebx + 0xcc]
mov ecx, dword [ebx + 0xc8]
mov edx, dword [ebx + 0x1c8]
push eax
push ecx
lea edi, [ebx + 0x1c0]
push edi
call edx
mov ecx, dword [ebx + 0xc0]
mov dword [ebx + 0xc8], eax
mov esi, dword [ebx + 0xc8]
mov eax, dword [ebx + 0xc4]
add esi, 0x40000
mov dword [ebx + 0xcc], edx
adc edx, 0
cmp edx, eax
jb 0x1000509e
ja 0x10005088
cmp esi, ecx
jb 0x1000509e
mov edx, ecx
add edx, 0x10
mov esi, eax
adc esi, 0
mov dword [ebx + 0xc8], edx
mov dword [ebx + 0xcc], esi
test dword [ebp + 0xc], 0x2000
je 0x10005184
mov edx, dword [ebx + 0x18c]
mov esi, dword [edx]
mov edx, dword [edx + 4]
and esi, 0xfffffffc
sub ecx, esi
sbb eax, edx
add ecx, 8
adc eax, 0
mov dword [esp + 0x20], ecx
add ecx, 0x400
mov dword [esp + 0x24], eax
adc eax, 0
push eax
push ecx
mov edx, ebx
lea esi, [esp + 0x798]
call fcn.100011a0
add esp, 8
mov dword [ebx + 0x1ac], eax
test eax, eax
je 0x100051cc
mov ecx, dword [ebx + 0xc0]
or dword [ebx + 0x20], 0x8000000
mov eax, dword [esp + 0xc]
mov edx, dword [ebx + 0xc4]
push eax
mov eax, dword [ebx + 0x1cc]
add ecx, 8
adc edx, 0
push edx
push ecx
push 0
push 0
push 0
push edi
call eax
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov eax, dword [ebx + 0x1ac]
push ecx
push edx
push eax
mov eax, dword [ebx + 0x18c]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [edi]
push edx
and ecx, 0xfffffffc
push ecx
push edi
call eax
mov ecx, dword [0x10045100]
test ecx, ecx
je 0x10005159
call fcn.100016d0
mov edx, dword [ebx + 0x1d4]
push edi
call edx
mov eax, dword [0x10045100]
test eax, eax
je 0x10005175
mov eax, 0x10044cf8
call fcn.1002bd60
mov dword [ebx + 0x248], 0
jmp 0x10005227
mov ecx, dword [ebx + 0x28]
push 0
add ecx, 0x500
push ecx
lea edx, [ebx + 0x5e0]
push edx
lea ecx, [esp + 0x79c]
call fcn.1002db40
mov eax, dword [ebx + 0xcc]
mov ecx, dword [ebx + 0xc8]
push eax
push ecx
mov edx, ebx
lea esi, [esp + 0x798]
call fcn.100011a0
add esp, 8
mov dword [ebx + 0x540], eax
test eax, eax
jne 0x100051f6
mov eax, dword [ebx + 0xb0]
test eax, eax
je 0x100051dc
push eax
call sym.bink2w32.dll__BinkUtilFree_4
push str.Out_of_memory.
call sym.bink2w32.dll__BinkSetError_4
mov edx, ebx
sub edx, dword [ebx - 4]
push edx
call sym.bink2w32.dll__BinkUtilFree_4
jmp 0x10005879
mov ecx, dword [esp + 0xc]
mov edx, dword [ebx + 0xc0]
push ecx
mov ecx, dword [ebx + 0xc4]
add edx, 8
adc ecx, 0
push ecx
mov ecx, dword [ebx + 0xc8]
push edx
mov edx, dword [ebx + 0xcc]
push edx
mov edx, dword [ebx + 0x1cc]
push ecx
push eax
push edi
call edx
mov ecx, dword [ebx + 0x14]
xor esi, esi
mov dword [ebx + 0xc], 0xffffffff
cmp ecx, esi
je 0x10005252
mov eax, dword [ebx + 0x18]
mov edx, 0x7d0
mul edx
push esi
push ecx
push edx
push eax
call fcn.100326f0
mov dword [ebx + 0x58c], eax
jmp 0x1000525c
mov dword [ebx + 0x58c], 0x7d0
mov dword [ebx + 0x44], 1
call sym.bink2w32.dll__RADTimerRead_0
sub eax, dword [ebx + 0x5ac]
mov dword [esp + 0xc], esi
mov dword [ebx + 0x5ac], eax
mov eax, dword [ebx + 0x184]
mov dword [eax + 0x3c], 0x10000
mov dword [ebx + 0x11c], esi
cmp dword [ebx + 0x38], esi
je 0x10005396
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x10005396
test eax, eax
jbe 0x10005396
mov edi, dword [esp + 0x18]
lea esp, [esp]
xor eax, eax
test esi, esi
jle 0x100052ce
mov ecx, dword [edi + esi*4]
lea esp, [esp]
cmp dword [edi + eax*4], ecx
je 0x10005358
inc eax
cmp eax, esi
jl 0x100052c0
xor ecx, ecx
cmp dword [ebx + 0x38], ecx
jle 0x10005358
mov edx, dword [edi + esi*4]
mov eax, dword [ebx + 0x1a8]
cmp dword [eax], edx
je 0x100052f1
inc ecx
add eax, 4
cmp ecx, dword [ebx + 0x38]
jl 0x100052e2
jmp 0x10005358
mov edx, dword [ebx + 0x11c]
lea eax, [edx + 1]
mov dword [ebx + 0x11c], eax
mov eax, dword [ebx + 0xbc]
mov dword [eax + edx*4], ecx
mov eax, dword [ebx + 0x1a4]
mov eax, dword [eax + ecx*4]
mov edi, eax
shr edi, 0x1d
and edi, 1
inc edi
movzx eax, ax
push edi
call fcn.10026d70
mov edi, dword [esp + 0x18]
mov dword [esp + edx*4 + 0x110], eax
mov edx, dword [ebx + 0x1a0]
mov ecx, dword [edx + ecx*4]
mov edx, dword [esp + 0xc]
lea ecx, [ecx + ecx*4]
shr ecx, 2
add ecx, 0xff
and ecx, 0xffffff00
add ecx, eax
lea eax, [edx + ecx + 0x10]
mov dword [esp + 0xc], eax
inc esi
cmp esi, dword [esp + 0x14]
jb 0x100052b0
cmp dword [esp + 0xc], 0
je 0x10005396
mov ecx, dword [esp + 0xc]
push 0
push ecx
mov edx, ebx
lea esi, [esp + 0x798]
call fcn.100011a0
add esp, 8
mov dword [esp + 0x1c], eax
mov dword [ebx + 0x5ec], eax
test eax, eax
jne 0x10005396
mov dword [ebx + 0x11c], eax
xor eax, eax
mov dword [0x10045140], eax
mov dword [0x1003b4cc], 1
mov dword [esp + 0xc], eax
cmp dword [ebx + 0x11c], eax
jbe 0x10005772
xor esi, esi
lea esp, [esp]
mov edx, dword [ebx + 0x184]
mov ecx, dword [esp + 0xc]
mov dword [edx + esi + 0xc], 0
mov eax, dword [ebx + 0xbc]
mov edx, dword [ebx + 0x1a4]
lea eax, [eax + ecx*4]
mov ecx, dword [eax]
mov ecx, dword [edx + ecx*4]
test ecx, 0x90000000
je 0x10005705
cmp dword [0x10045130], 0
je 0x10005705
movzx ecx, cx
mov dword [esp + 0x14], ecx
cmp ecx, 0x3e800
ja 0x10005705
mov eax, dword [eax]
mov ecx, dword [ebx + 0x1a0]
add eax, eax
add eax, eax
mov ecx, dword [eax + ecx]
mov eax, dword [eax + edx]
mov edi, eax
shr eax, 0x1d
lea ecx, [ecx + ecx*4]
and eax, 1
shr ecx, 2
shr edi, 0x1b
inc eax
add ecx, 0xff
and edi, 8
mov edx, eax
mov eax, dword [esp + 0x14]
and ecx, 0xffffff00
add edi, 8
cmp dword [esp + 0x1a4], 0
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], eax
je 0x100054b6
cmp dword [esp + 0x1a8], 0
je 0x100054b6
fild dword [esp + 0x14]
fnstcw word [esp + 0x10]
fimul dword [esp + 0x744]
movzx eax, word [esp + 0x10]
or eax, 0xc00
mov dword [esp + 0x20], eax
fimul dword [esp + 0x1a4]
fild dword [esp + 0x740]
fimul dword [esp + 0x1a8]
fdivp st(1)
fldcw word [esp + 0x20]
fistp qword [esp + 0x20]
mov eax, dword [esp + 0x20]
fldcw word [esp + 0x10]
mov dword [esp + 0x10], eax
cmp eax, 0x3e800
jbe 0x100054c5
mov dword [esp + 0x10], 0x3e800
imul edx, edi
imul edx, dword [esp + 0x14]
add edx, edx
shr edx, 3
cmp ecx, edx
ja 0x10005705
mov edx, dword [0x10045100]
test edx, edx
je 0x100054e9
call fcn.10001720
mov eax, dword [ebx + 0x20]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push ebx
push eax
mov eax, dword [ebx + 0x184]
push ecx
push edi
push edx
add eax, esi
push eax
call dword [0x10045130]
mov ecx, dword [0x10045100]
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x10005520
mov eax, 0x10044a78
call fcn.1002bd60
cmp dword [esp + 0x20], 0
je 0x10005705
mov eax, dword [esp + 0x14]
mov edx, dword [ebx + 0x184]
mov dword [edx + esi + 0x1c], eax
mov ecx, dword [ebx + 0x184]
cmp dword [ecx + esi + 0x30], 0
lea eax, [ecx + esi + 0x30]
jne 0x10005550
mov dword [eax], 0xffffffff
mov edx, dword [esp + 0x2c]
mov eax, dword [ebx + 0x184]
add edx, 0x10
mov dword [eax + esi + 8], edx
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x184]
mov dword [ecx + esi + 0xc], eax
mov edx, dword [ebx + 0x184]
add eax, dword [edx + esi + 8]
lea ecx, [edx + esi]
mov dword [esp + 0x1c], eax
mov eax, 0x2ee
sub eax, dword [ecx + 0x38]
jns 0x1000558c
xor eax, eax
xor edx, edx
cmp edi, 8
sete dl
push 0
mov dword [ecx + 0x54], edx
mov ecx, dword [ebx + 0x184]
mov edx, dword [ecx + esi + 0xc]
add edx, dword [ecx + esi + 8]
add ecx, esi
mov dword [ecx + 0x10], edx
mov ecx, dword [ebx + 0x184]
mov edx, dword [ecx + esi + 0xc]
add ecx, esi
mov dword [ecx], edx
mov ecx, dword [ebx + 0x184]
mov edx, dword [ecx + esi + 0xc]
add ecx, esi
mov dword [ecx + 0x18], edx
mov ecx, dword [esp + 0x14]
cdq
push ecx
push edx
push eax
call fcn.100326b0
mov ecx, dword [esp + 0x18]
push 0
push ecx
push edx
push eax
call fcn.100326b0
push 0
push 2
push edx
push eax
call fcn.100326b0
push 0
push 0x3e8
push edx
push eax
call fcn.100326f0
mov edx, dword [ebx + 0x184]
and eax, 0xfffffffc
mov dword [edx + esi + 0x48], eax
mov eax, dword [ebx + 0x184]
mov ecx, dword [eax + esi + 8]
add eax, esi
mov edx, ecx
sub edx, dword [eax + 0x48]
cmp edx, 0x10
jge 0x10005626
add ecx, 0xfffffff0
mov dword [eax + 0x48], ecx
mov eax, dword [ebx + 0xbc]
mov ecx, dword [esp + 0xc]
mov edx, dword [eax + ecx*4]
mov eax, dword [ebx + 0x1a4]
mov eax, dword [eax + edx*4]
test eax, eax
js 0x1000564e
test eax, 0x10000000
je 0x1000564e
mov ecx, 1
jmp 0x10005650
xor ecx, ecx
mov edi, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push ecx
movzx eax, ax
push edi
call fcn.10026db0
mov edx, dword [ebx + 0x184]
mov dword [edx + esi + 0x14], eax
mov eax, dword [0x10045100]
test eax, eax
je 0x1000567b
call fcn.10001720
mov ecx, dword [ebx + 0x184]
cmp dword [ecx + esi + 0x14], 0
lea eax, [ecx + esi]
jne 0x100056a2
mov edx, dword [eax + 0x174]
push eax
call edx
mov eax, dword [ebx + 0x184]
mov dword [eax + esi + 0xc], 0
mov ecx, dword [0x10045100]
test ecx, ecx
je 0x100056b6
mov eax, 0x10044a78
call fcn.1002bd60
mov eax, dword [ebx + 0x184]
mov edx, dword [esp + 0xc]
add edi, dword [esp + edx*4 + 0x110]
mov ecx, dword [eax + esi + 0x14]
add eax, esi
mov dword [esp + 0x1c], edi
test ecx, ecx
je 0x100056da
mov ecx, dword [ecx + 0x2c]
jmp 0x100056dc
xor ecx, ecx
mov dword [eax + 4], ecx
mov ecx, dword [ebx + 0x5b4]
mov eax, dword [ebx + 0x5b0]
add ecx, ecx
xor edx, edx
add ecx, ecx
lea eax, [eax + eax*2]
div ecx
mov edx, dword [ebx + 8]
sub edx, eax
mov eax, dword [ebx + 0x184]
mov dword [eax + esi + 0x40], edx
mov ecx, dword [ebx + 0x184]
cmp dword [ecx + esi + 0x3c], 0
lea eax, [ecx + esi + 0x3c]
jne 0x1000571c
mov dword [eax], 0x10000
mov edx, dword [ebx + 0x184]
cmp dword [edx + esi + 0xc], 0
jne 0x10005758
dec dword [ebx + 0x11c]
mov eax, dword [ebx + 0x11c]
mov edi, dword [esp + 0xc]
mov ecx, dword [ebx + 0xbc]
sub eax, edi
add eax, eax
lea ecx, [ecx + edi*4]
add eax, eax
push eax
lea edx, [ecx + 4]
push edx
push ecx
call fcn.10032e50
add esp, 0xc
jmp 0x10005766
inc dword [esp + 0xc]
mov edi, dword [esp + 0xc]
add esi, 0x180
cmp edi, dword [ebx + 0x11c]
jb 0x100053c0
cmp dword [ebx + 0x11c], 0
je 0x100057b7
mov eax, dword [0x10045100]
mov dword [ebx + 0x40], 1
test eax, eax
je 0x10005790
call fcn.10001720
mov eax, dword [ebx + 0x11c]
add dword [0x10045134], eax
mov ecx, dword [0x10045100]
test ecx, ecx
je 0x100057b0
mov eax, 0x10044a78
call fcn.1002bd60
mov eax, ebx
call fcn.100032e0
mov eax, ebx
mov dword [ebx + 0x1e4], 0x10002640
mov dword [ebx + 0x1f0], 0x10003eb0
call fcn.100027f0
test dword [ebx + 0x20], 0x8000000
mov eax, 0x200000
jne 0x100057e3
or dword [ebp + 0xc], eax
cmp dword [ebx + 0x1ac], 0
jne 0x10005816
test dword [ebp + 0xc], eax
jne 0x10005811
mov edx, dword [ebx + 0x1d0]
lea esi, [ebx + 0x1c0]
push esi
call edx
or eax, edx
je 0x10005811
mov eax, dword [ebx + 0x1d0]
push esi
call eax
or eax, edx
jne 0x10005804
call fcn.10002570
mov eax, 1
mov ecx, ebx
mov dword [ebx + 0x100], 0xf0000000
mov dword [ebx + 0x104], 0
call fcn.10003a50
mov eax, ebx
call fcn.100033a0
mov ecx, 1
mov edx, 0x100450fc
lock xadd dword [edx], ecx
mov dword [ebx + 0x190], ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x948]
xor ecx, esp
call fcn.100329a0
mov esp, ebp
pop ebp
ret
push str.The_file_has_a_corrupt_header.
jmp 0x10005874
push str.Not_a_Bink_file.
call sym.bink2w32.dll__BinkSetError_4
cmp dword [esp + 0x28], 0
jne 0x100058ef
mov eax, dword [0x10045100]
test eax, eax
je 0x100058cd
mov ecx, dword [0x10044d74]
mov eax, dword [ecx + 0x2c]
and eax, 0xffff0000
cmp eax, 0x30000
jne 0x100058aa
mov eax, 0x10044cf8
call fcn.1002ba50
jmp 0x100058cd
cmp eax, 0x10000
jne 0x100058bf
mov ecx, dword [ecx + 0x30]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x100058cd
cmp eax, 0x20000
jne 0x100058cd
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [esp + 0x350]
push edx
call dword [esp + 0x368]
mov eax, dword [0x10045100]
test eax, eax
je 0x100058ef
mov eax, 0x10044cf8
call fcn.1002bd60
mov ecx, dword [esp + 0x954]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.100329a0
mov esp, ebp
pop ebp
ret