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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0x14]
movsx ecx, byte [eax + 1]
movsx eax, byte [eax + 5]
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0xfffffff7
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.00822548
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
je 0x823c36
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
call fcn.0081ec32
push dword [ebp - 0x18]
lea eax, [ebp - 8]
push dword [ebp - 0x1c]
push eax
movsx eax, byte [edi + 0xc]
push eax
movsx eax, byte [edi + 3]
push eax
call fcn.0081f413
add esp, 0x20
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x82382c
movsx ebx, byte [edi + 0x11]
lea esi, [eax + eax*8]
mov eax, dword [0x9c21f4]
shl esi, 4
mov dword [ebp - 0x30], esi
add esi, eax
mov al, byte [edi + 0x12]
test al, al
je 0x8238a9
movsx eax, al
push eax
call fcn.00826377
add ebx, eax
pop ecx
jns 0x8238a1
xor ebx, ebx
jmp 0x8238a9
cmp ebx, 0x7f
jle 0x8238a9
push 0x7f
pop ebx
push ebx
call fcn.0082636a
mov edx, dword [ebp + 0x1c]
mov word [esi + 0x4c], ax
xor eax, eax
mov ax, word [edi + 4]
pop ecx
mov word [esi + 0x88], ax
movsx cx, byte [edi + 0xd]
sub edx, ecx
mov ecx, dword [ebp + 0x24]
imul edx, edx, 0x64
add eax, edx
test ecx, ecx
mov word [esi + 0x88], ax
je 0x8238e7
add eax, ecx
mov word [esi + 0x88], ax
mov ax, word [edi + 6]
test ax, ax
je 0x823901
movsx eax, ax
push eax
call fcn.00826377
add word [esi + 0x88], ax
pop ecx
mov eax, dword [edi + 0x24]
mov dword [esi + 0x78], eax
mov al, byte [edi + 0x15]
test al, al
movsx ebx, byte [edi + 0x14]
je 0x82391e
movsx eax, al
push eax
call fcn.00826377
pop ecx
add ebx, eax
cmp ebx, 0x7f
jle 0x823926
push 0x7f
pop ebx
test ebx, ebx
jge 0x82392c
xor ebx, ebx
mov eax, ebx
imul eax, dword [ebp + 0x20]
cdq
push 0x7f
pop ecx
idiv ecx
mov dword [ebp - 0x28], eax
movsx ax, byte [edi + 0x10]
imul eax, eax, 0x64
mov word [esi + 0x86], ax
mov al, byte [ebp - 0x20]
mov byte [esi + 0x68], al
mov eax, dword [edi + 0x28]
mov dword [esi + 0x70], eax
movsx eax, byte [edi + 0x1a]
shl eax, 0x10
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x70]
mov ecx, dword [eax]
test ecx, ecx
mov dword [esi + 0x44], ecx
jge 0x823973
mov dword [esi + 0x44], DirectSoundCreate
mov eax, dword [eax + 4]
shl eax, 0x10
sub eax, dword [esi + 0x40]
cdq
idiv dword [esi + 0x44]
mov dword [esi + 0x3c], eax
mov eax, dword [edi + 0x30]
mov dword [esi + 0x80], eax
mov al, byte [edi + 0x1d]
mov byte [esi + 0x6a], al
mov ax, word [edi + 0x54]
mov word [esi + 0x84], ax
cmp byte [edi + 0x1c], 0
je 0x8239b5
call fcn.0081eb58
movsx ecx, byte [edi + 0x1c]
xor edx, edx
div ecx
mov byte [esi + 0x6b], dl
jmp 0x8239b9
mov byte [esi + 0x6b], 0
cmp byte [edi + 0x1e], 0
je 0x8239d1
call fcn.0081eb58
movzx ecx, byte [edi + 0x1d]
xor edx, edx
div ecx
mov byte [esi + 0x6c], dl
jmp 0x8239d5
mov byte [esi + 0x6c], 0
mov ebx, dword [ebp + 0x14]
mov ax, word [ebx + 0xe]
push dword [ebp - 0x10]
mov word [esi + 0x6e], ax
mov ax, word [ebx + 0xc]
and word [esi + 0x8a], 0
mov word [esi + 0x8c], ax
call fcn.008219bb
mov ax, word [ebp + 8]
mov word [esi + 0x12], ax
mov ax, word [ebp + 0xc]
mov word [esi + 0x10], ax
mov eax, dword [edi + 0x60]
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0x58]
mov dword [esi + 0x14], eax
mov ax, word [edi + 0x56]
mov word [esi + 0x20], ax
mov al, byte [edi + 0x13]
mov byte [esi + 0x22], al
mov al, byte [edi + 3]
mov byte [esi + 0x23], al
movsx eax, byte [ebx]
mov dword [ebp - 4], eax
movsx eax, byte [edi + 3]
fild dword [ebp - 4]
pop ecx
xor ecx, ecx
test eax, eax
fmul dword [0x890bf0]
mov dword [ebp - 4], ecx
fstp dword [ebp - 0x2c]
jle 0x823b06
jmp 0x823a54
mov ecx, dword [ebp - 4]
mov dx, word [edi + ecx*2 + 0xbc]
fldz
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
sub dx, word [eax*2 + 0x9c21f4]
movsx eax, word [esi + ecx*2 + 4]
mov word [esi + ecx*2 + 0x50], dx
mov cx, word [ebp - 0x24]
lea ebx, [eax + eax*8]
shl ebx, 4
add ebx, dword [0x9c21f4]
push eax
mov word [ebx + 0x24], cx
mov cl, byte [ebp - 0x28]
mov byte [ebx + 0x2b], cl
mov ecx, dword [ebp + 0x14]
mov cl, byte [ecx + 4]
mov byte [ebx + 0x5f], cl
mov ecx, dword [ebp - 0x2c]
mov dword [ebx + 0x38], ecx
mov ecx, dword [edi + 0x20]
mov dword [ebx + 0x74], ecx
fstp dword [ebx + 0x30]
mov cl, byte [edi + 0xf]
mov byte [ebx + 0x5c], cl
mov cl, byte [edi + 0xe]
mov byte [ebx + 0x5e], cl
mov byte [ebx + 0x5d], 0
mov ecx, dword [esi + 0x40]
mov dword [ebx + 0x40], ecx
mov ecx, dword [esi + 0x44]
mov dword [ebx + 0x44], ecx
mov ecx, dword [esi + 0x3c]
mov dword [ebx + 0x3c], ecx
mov ecx, dword [esi + 0x70]
mov dword [ebx + 0x70], ecx
mov cl, byte [edi + 0x1b]
mov byte [ebx + 0x69], cl
mov cl, byte [esi + 0x6b]
mov byte [ebx + 0x6b], cl
mov ecx, dword [edi + 0x2c]
mov dword [ebx + 0x7c], ecx
call fcn.008218a0
cmp dword [ebp - 4], 5
pop ecx
sete al
inc dword [ebp - 4]
mov byte [ebx + 0x4e], al
movsx eax, byte [edi + 3]
cmp dword [ebp - 4], eax
jl 0x823a51
mov ebx, dword [ebp + 0x14]
mov al, byte [edi + 3]
cmp al, 1
jne 0x823b27
mov ax, word [esi + 0x50]
add ax, word [ebx + 8]
add ax, word [esi + 0x4c]
mov word [esi + 0x1c], ax
mov ax, word [ebx + 0xa]
mov word [esi + 0x1e], ax
jmp 0x823b8f
and dword [ebp - 4], 0
movsx ecx, al
test ecx, ecx
mov eax, dword [0x9c1fdc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
lea eax, [eax + eax*2]
lea eax, [eax*2 + 0x8c5caa]
mov dword [ebp - 0x2c], eax
jle 0x823b8f
lea edx, [esi + 0x50]
movsx eax, word [edx - 0x4c]
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
movzx cx, byte [ecx + ebx]
lea eax, [eax + eax*8]
shl eax, 4
add eax, dword [0x9c21f4]
shl ecx, 8
mov word [eax + 0x1c], cx
mov bx, word [edx]
and word [eax + 0x1e], 0
add bx, cx
inc dword [ebp - 4]
mov word [eax + 0x1c], bx
movsx eax, byte [edi + 3]
inc edx
inc edx
cmp dword [ebp - 4], eax
jl 0x823b4d
mov ebx, dword [ebp + 0x14]
fild dword [ebp - 0xc]
and dword [ebp - 4], 0
cmp byte [edi + 3], 0
fmul dword [0x890bf0]
jle 0x823be1
add esi, 4
movsx eax, word [esi]
mov cl, byte [ebp - 0xc]
lea eax, [eax + eax*8]
shl eax, 4
add eax, dword [0x9c21f4]
mov byte [eax + 0x60], cl
xor ecx, ecx
cmp dword [0x90bd18], ecx
jle 0x823bd3
mov edx, dword [eax + 0x64]
fst dword [edx + ecx*4]
inc ecx
cmp ecx, dword [0x90bd18]
jl 0x823bc4
inc dword [ebp - 4]
movsx eax, byte [edi + 3]
inc esi
inc esi
cmp dword [ebp - 4], eax
jl 0x823ba5
movzx eax, word [ebx + 0x16]
fstp st(0)
push eax
movzx eax, word [ebx + 0x14]
push eax
movzx eax, word [ebx + 0xe]
push eax
push dword [ebp - 0x10]
push dword [ebp + 0x10]
push edi
call fcn.008262da
add esp, 0x18
test eax, eax
jge 0x823c36
xor ebx, ebx
cmp byte [edi + 3], bl
jle 0x823825
mov esi, dword [ebp - 0x30]
add esi, 4
mov eax, dword [0x9c21f4]
movsx eax, word [esi + eax]
push eax
call fcn.0081f6c3
movsx eax, byte [edi + 3]
inc ebx
inc esi
inc esi
cmp ebx, eax
pop ecx
jl 0x823c16
jmp 0x823825
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret