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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 0x40]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + 0x1c]
push edi
mov edi, dword [eax + 0x510]
mov eax, dword [eax + 0x504]
mov dword [esp + 0x34], ecx
mov ecx, dword [ecx + 0xb20]
mov dword [esp + 0x2c], edi
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], ecx
test ebx, ebx
je 0x10020c32
mov esi, dword [edi + 0x340]
mov edx, eax
dec esi
and edx, 0xfffffffe
and eax, 0xfffffffc
xor ecx, ecx
cmp esi, 3
ja case.default.0x100204f5
jmp dword [esi*4 + 0x10020c70]
test eax, eax
jle 0x10020553
movq mm0, qword [ebx + ecx*4]
movq mm1, qword [ebx + ecx*4 + 8]
movq mm3, mm1
movq mm2, qword [0x1004b114]
movq mm4, mm2
pand mm3, mm4
psrld mm3, 2
movq mm4, mm1
movq mm1, qword [0x1004b11c]
movq mm5, mm1
pand mm4, mm5
por mm3, mm4
movq mm4, mm0
pand mm4, mm2
movq mm2, mm4
psrld mm2, 2
pand mm0, mm1
por mm2, mm0
movq qword [ebx + ecx*4], mm2
movq qword [ebx + ecx*4 + 8], mm3
add ecx, 4
cmp ecx, eax
jl 0x10020500
cmp ecx, edx
jge case.default.0x100204f5
jmp 0x10020560
movq mm0, qword [ebx + ecx*4]
movq mm1, mm0
movq mm2, qword [0x1004b114]
pand mm1, mm2
psrld mm1, 2
movq mm2, qword [0x1004b11c]
pand mm0, mm2
por mm1, mm0
movq qword [ebx + ecx*4], mm1
add ecx, 2
cmp ecx, edx
jl 0x10020560
jmp case.default.0x100204f5
test eax, eax
jle 0x100205f3
jmp 0x100205a0
movq mm0, qword [ebx + ecx*4]
movq mm1, qword [ebx + ecx*4 + 8]
movq mm3, mm1
movq mm2, qword [0x1004b114]
movq mm4, mm2
pand mm3, mm4
psrld mm3, 3
movq mm4, mm1
movq mm1, qword [0x1004b11c]
movq mm5, mm1
pand mm4, mm5
por mm3, mm4
movq mm4, mm0
pand mm4, mm2
movq mm2, mm4
psrld mm2, 3
pand mm0, mm1
por mm2, mm0
movq qword [ebx + ecx*4], mm2
movq qword [ebx + ecx*4 + 8], mm3
add ecx, 4
cmp ecx, eax
jl 0x100205a0
cmp ecx, edx
jge case.default.0x100204f5
jmp 0x10020600
movq mm0, qword [ebx + ecx*4]
movq mm1, mm0
movq mm2, qword [0x1004b114]
pand mm1, mm2
psrld mm1, 3
movq mm2, qword [0x1004b11c]
pand mm0, mm2
por mm1, mm0
movq qword [ebx + ecx*4], mm1
add ecx, 2
cmp ecx, edx
jl 0x10020600
jmp case.default.0x100204f5
test eax, eax
jle 0x100206ab
jmp 0x10020640
movq mm0, qword [ebx + ecx*4]
movq mm1, qword [ebx + ecx*4 + 8]
movq mm3, mm0
movq mm2, qword [0x1004b11c]
movq mm4, mm2
pand mm3, mm4
movq mm4, mm1
pand mm4, mm2
movq mm2, mm4
movq mm4, qword [0x1004b114]
movq mm5, mm4
pand mm0, mm5
psrld mm0, 4
pand mm1, mm4
psrld mm1, 4
movq mm4, mm0
movq mm5, mm0
paddd mm4, mm5
paddd mm4, mm0
movq mm0, mm4
por mm0, mm3
movq qword [ebx + ecx*4], mm0
movq mm0, mm1
movq mm3, mm1
paddd mm0, mm3
paddd mm0, mm1
por mm0, mm2
movq qword [ebx + ecx*4 + 8], mm0
add ecx, 4
cmp ecx, eax
jl 0x10020640
cmp ecx, edx
jge case.default.0x100204f5
jmp 0x100206c0
movq mm0, qword [ebx + ecx*4]
movq mm1, mm0
movq mm2, qword [0x1004b11c]
pand mm1, mm2
movq mm2, qword [0x1004b114]
pand mm0, mm2
psrld mm0, 4
movq mm2, mm0
movq mm3, mm0
paddd mm2, mm3
paddd mm2, mm0
por mm2, mm1
movq qword [ebx + ecx*4], mm2
add ecx, 2
cmp ecx, edx
jl 0x100206c0
jmp case.default.0x100204f5
test eax, eax
jle 0x10020755
movq mm0, qword [ebx + ecx*4]
movq mm1, qword [ebx + ecx*4 + 8]
movq mm3, mm1
movq mm2, qword [0x1004b114]
movq mm4, mm2
pand mm3, mm4
psrld mm3, 4
movq mm4, mm1
movq mm1, qword [0x1004b11c]
movq mm5, mm1
pand mm4, mm5
por mm3, mm4
movq mm4, mm0
pand mm4, mm2
movq mm2, mm4
psrld mm2, 4
pand mm0, mm1
por mm2, mm0
movq qword [ebx + ecx*4], mm2
movq qword [ebx + ecx*4 + 8], mm3
add ecx, 4
cmp ecx, eax
jl 0x10020702
cmp ecx, edx
jge case.default.0x100204f5
lea esp, [esp]
movq mm0, qword [ebx + ecx*4]
movq mm1, mm0
movq mm2, qword [0x1004b114]
pand mm1, mm2
psrld mm1, 4
movq mm2, qword [0x1004b11c]
pand mm0, mm2
por mm1, mm0
movq qword [ebx + ecx*4], mm1
add ecx, 2
cmp ecx, edx
jl 0x10020760
emms
cmp ecx, dword [esp + 0xc]
jge 0x100207e4
mov esi, dword [ebx + ecx*4]
mov eax, dword [edi + 0x340]
mov edx, esi
dec eax
and edx, 0x7fff
cmp eax, 3
ja case.default.0x100207ac
jmp dword [eax*4 + 0x10020c80]
sar edx, 2
jmp case.default.0x100207ac
sar edx, 3
jmp case.default.0x100207ac
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
jmp case.default.0x100207ac
sar edx, 4
and esi, 0x8000
or esi, edx
mov dword [ebx + ecx*4], esi
inc ecx
cmp ecx, dword [esp + 0xc]
jl 0x10020795
cmp dword [esp + 0xc], 2
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
jle 0x1002090f
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [ebx + 8]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x78]
add edi, 0x34c
add ecx, 0x30c
sub eax, ebx
add edx, 0xfffffffe
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edx
nop
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0xfc]
mov esi, dword [ecx]
mov edi, dword [ebx + eax*4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + esi*4 + 0x344]
mov eax, dword [ecx + eax*4 + 0x344]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx]
push edi
push edx
push eax
mov eax, dword [ebx + esi*4]
call fcn.100201d0
mov edx, dword [esp + 0x24]
mov ecx, dword [edx]
add esp, 0xc
test ecx, 0x8000
jne 0x100208d7
cmp eax, ecx
je 0x100208d7
mov edx, dword [ebp + 0x10]
mov edx, dword [edx + 0x50c]
sub edx, eax
cmp edx, eax
jl 0x10020888
mov edx, eax
sub ecx, eax
jns 0x100208a6
mov eax, edx
neg eax
cmp ecx, eax
jge 0x1002089b
sub edx, ecx
dec edx
mov ecx, edx
jmp 0x100208b0
add ecx, ecx
or edx, 0xffffffff
sub edx, ecx
mov ecx, edx
jmp 0x100208b0
cmp ecx, edx
jl 0x100208ae
add ecx, edx
jmp 0x100208b0
add ecx, ecx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [eax + edx], ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0xfc]
and edi, 0x7fff
mov dword [ebx + eax*4], edi
and dword [ebx + esi*4], 0x7fff
jmp 0x100208ed
mov edx, dword [esp + 0x18]
or eax, 0x8000
mov dword [edx], eax
mov eax, dword [esp + 0x14]
mov dword [eax + edx], 0
mov eax, 4
add dword [esp + 0x1c], eax
add dword [esp + 0x10], eax
add edx, eax
sub dword [esp + 0xc], 1
mov dword [esp + 0x18], edx
jne 0x10020830
mov edi, dword [esp + 0x2c]
mov ecx, dword [ebp + 8]
push 1
push 1
push ecx
call dword [sym.imp.ogg.dll_oggpack_write]
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 0x50c]
inc dword [esi + 0x51c]
dec eax
add esp, 0xc
bsr ecx, eax
je 0x10020938
inc ecx
jmp 0x1002093a
xor ecx, ecx
lea edx, [ecx + ecx]
add dword [esi + 0x518], edx
bsr eax, eax
je 0x1002094b
inc eax
jmp 0x1002094d
xor eax, eax
mov ecx, dword [ebp + 8]
push eax
mov eax, dword [esp + 0x7c]
push eax
push ecx
call dword [sym.imp.ogg.dll_oggpack_write]
mov esi, dword [esi + 0x50c]
dec esi
add esp, 0xc
bsr eax, esi
je 0x1002096f
inc eax
jmp 0x10020971
xor eax, eax
mov edx, dword [esp + 0x7c]
push eax
mov eax, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.ogg.dll_oggpack_write]
add esp, 0xc
cmp dword [edi], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 2
jle 0x10020b5b
lea ecx, [edi + 4]
mov dword [esp + 0x14], ecx
jmp 0x100209b0
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov ecx, dword [edi + eax*4 + 0x80]
mov edx, dword [edi + eax*4 + 0xc0]
mov dword [esp + 0x18], ecx
mov ecx, edx
mov esi, 1
shl esi, cl
xor ecx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], ecx
test edx, edx
je 0x10020ac8
xor edx, edx
test esi, esi
jle 0x10020a46
mov ecx, dword [esp + 0x34]
add eax, 0xa
shl eax, 5
add eax, edi
lea ecx, [ecx]
mov edi, dword [eax]
test edi, edi
jge 0x10020a30
mov dword [esp + edx*4 + 0x58], 1
jmp 0x10020a3e
mov edi, dword [ecx + edi*4 + 0x720]
mov edi, dword [edi + 4]
mov dword [esp + edx*4 + 0x58], edi
inc edx
add eax, 4
cmp edx, esi
jl 0x10020a20
xor edx, edx
cmp dword [esp + 0x18], edx
jle 0x10020a91
mov edi, dword [esp + 0xc]
lea edi, [esp + edi*4 + 0x78]
xor eax, eax
test esi, esi
jle 0x10020a71
mov ecx, dword [edi]
mov edi, edi
cmp ecx, dword [esp + eax*4 + 0x58]
jl 0x10020a6d
inc eax
cmp eax, esi
jl 0x10020a60
jmp 0x10020a71
mov dword [esp + edx*4 + 0x38], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + edx*4 + 0x38]
shl eax, cl
mov ecx, dword [esp + 0x30]
add dword [esp + 0x10], ecx
inc edx
or dword [esp + 0x1c], eax
add edi, 4
cmp edx, dword [esp + 0x18]
jl 0x10020a56
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov edi, dword [eax + ecx*4 + 0x100]
mov edx, dword [ebp + 8]
imul edi, edi, 0x2c
add edi, dword [esp + 0x24]
mov esi, dword [esp + 0x1c]
push edx
call fcn.10023620
mov ecx, dword [ebp + 0x10]
mov edi, dword [esp + 0x30]
add esp, 4
add dword [ecx + 0x514], eax
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x20], ecx
test edx, edx
jle 0x10020b41
lea edx, [eax*8 + 0x50]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x30], edx
lea edx, [esp + eax*4 + 0x78]
mov dword [esp + 0x10], edx
mov eax, dword [esp + ecx*4 + 0x38]
add eax, dword [esp + 0x30]
mov eax, dword [edi + eax*4]
test eax, eax
jl 0x10020b2f
mov edx, dword [esp + 0x10]
imul eax, eax, 0x2c
mov esi, dword [edx]
mov edx, dword [esp + 0x24]
add eax, edx
cmp esi, dword [eax + 4]
jge 0x10020b2f
mov ecx, dword [ebp + 8]
push ecx
mov edi, eax
call fcn.10023620
mov ecx, dword [ebp + 0x10]
mov edi, dword [esp + 0x30]
add esp, 4
add dword [ecx + 0x518], eax
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
add dword [esp + 0x10], 4
inc ecx
cmp ecx, edx
mov dword [esp + 0x20], ecx
jl 0x10020aed
mov eax, dword [esp + 0x28]
add dword [esp + 0xc], edx
add dword [esp + 0x14], 4
inc eax
cmp eax, dword [edi]
mov dword [esp + 0x28], eax
jl 0x100209b0
mov ecx, dword [edi + 0x340]
imul ecx, dword [ebx]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
mov edx, 1
cmp dword [eax + 0x504], edx
mov dword [esp + 0xc], edx
jle 0x10020bf1
add eax, 0x108
mov dword [esp + 0x24], eax
jmp 0x10020b90
mov edx, dword [eax]
mov esi, dword [ebx + edx*4]
mov eax, esi
and eax, 0x7fff
cmp eax, esi
jne 0x10020bd2
mov esi, dword [edi + 0x340]
imul esi, eax
mov eax, dword [edi + edx*4 + 0x344]
mov edx, dword [ebp + 0x18]
push edx
push ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x1c], eax
push eax
mov eax, esi
call fcn.1001fe90
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x28], eax
mov ecx, esi
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
mov esi, dword [ebp + 0x10]
inc edx
add eax, 4
cmp edx, dword [esi + 0x504]
mov dword [esp + 0xc], edx
mov dword [esp + 0x24], eax
jl 0x10020b90
emms
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x24]
mov esi, dword [esp + 0x14]
cdq
sub eax, edx
sar eax, 1
cmp esi, eax
jge 0x10020c20
mov ebx, dword [ebp + 0x18]
lea esp, [esp]
mov dword [ebx + esi*4], ecx
mov eax, dword [edi + 0x24]
cdq
sub eax, edx
inc esi
sar eax, 1
cmp esi, eax
jl 0x10020c10
mov eax, 1
add dword [0x1004f4c0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push 1
push 0
push ecx
call dword [sym.imp.ogg.dll_oggpack_write]
mov eax, dword [esi + 0x24]
cdq
sub eax, edx
mov edx, dword [ebp + 0x18]
sar eax, 1
add eax, eax
add esp, 0xc
add eax, eax
push eax
push 0
push edx
call sub.MSVCR90.dll_memset
inc dword [0x1004f4c0]
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret