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

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
xor ebx, ebx
cmp edi, ebx
mov dword [0x63d3c0], ebx
jl 0x51f7e1
mov esi, dword [esp + 0x14]
cmp esi, 0xfa0
jl 0x51f7e1
cmp esi, 0xffff
jg 0x51f7e1
cmp edi, 0x400
jg 0x51f7e1
call fcn.0051f7f4
mov eax, dword [0x613e0c]
mov byte [eax + 0x20], bl
call sub.KERNEL32.dll_GetCurrentThreadId
mov ecx, dword [0x613e0c]
mov dword [ecx + 0x1c], eax
mov eax, dword [0x613e0c]
mov dword [0x63d3c0], ebx
mov ecx, dword [esp + 0x1c]
mov dword [eax + 0x14f8], 0x100
mov eax, dword [0x613e0c]
mov dword [eax + 0x14d8], edi
mov eax, dword [0x613e0c]
mov edi, 0xff
mov dword [eax + 0x38], esi
mov eax, dword [0x613e0c]
mov dword [eax + 8], ecx
mov eax, dword [0x613e0c]
mov dword [eax + 0x14ec], 0x10
mov eax, dword [0x613e0c]
mov dword [eax + 0x10], edi
call fcn.00520a7e
call fcn.00521a98
mov eax, dword [0x613e0c]
push dword [eax + 4]
call fcn.0051f126
mov eax, dword [0x613e0c]
xor ebp, ebp
inc ebp
push esi
mov eax, dword [eax]
mov dword [eax], ebp
mov eax, dword [0x613e0c]
mov eax, dword [eax]
mov dword [eax + 4], ebp
mov eax, dword [0x613e0c]
mov byte [eax + 0xc], bl
mov eax, dword [0x613e0c]
mov eax, dword [eax]
call dword [eax + 0x10]
test al, al
pop ecx
je 0x51f7eb
mov eax, dword [0x613e0c]
mov ecx, dword [eax]
cmp dword [ecx], ebx
je 0x51f2ce
call dword [ecx + 0x30]
cmp al, bl
mov eax, dword [0x613e0c]
je 0x51f2ce
cmp dword [eax + 4], 2
jne 0x51f2ce
dec dword [eax + 0x14dc]
mov eax, dword [0x613e0c]
mov edx, dword [eax + 0x14e8]
lea ecx, [eax + 0x14dc]
cmp dword [ecx], edx
jle 0x51f2e5
mov dword [ecx], edx
mov eax, dword [0x613e0c]
lea ecx, [eax + 0x14dc]
mov edx, dword [ecx]
cmp edx, dword [eax + 0x14e4]
jge 0x51f2fc
mov dword [ecx], ebx
mov eax, dword [0x613e0c]
mov edx, dword [eax + 0x14e8]
lea ecx, [eax + 0x14e0]
cmp dword [ecx], edx
jle 0x51f313
mov dword [ecx], edx
mov eax, dword [0x613e0c]
lea ecx, [eax + 0x14e0]
mov edx, dword [ecx]
cmp edx, dword [eax + 0x14e4]
jge 0x51f32a
mov dword [ecx], ebx
mov eax, dword [0x613e0c]
cmp dword [eax + 0x14dc], ebp
jge 0x51f33b
mov eax, dword [eax]
mov dword [eax], ebx
mov eax, dword [0x613e0c]
cmp dword [eax + 0x14e0], ebp
jge 0x51f34d
mov eax, dword [eax]
mov dword [eax + 4], ebx
mov eax, dword [0x613e0c]
cmp dword [eax + 0x3c], 0xffffffff
jne 0x51f372
cmp dword [eax + 4], ebp
je 0x51f366
cmp byte [eax + 0xc], bl
jne 0x51f366
mov dword [eax + 0x3c], 0x32
jmp 0x51f36d
mov dword [eax + 0x3c], 0x64
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x3c]
mov dword [eax + 0x4c], ecx
mov eax, dword [0x613e0c]
shl dword [eax + 0x3c], 1
call fcn.0052f597
test al, al
je 0x51f7eb
mov eax, dword [0x613e0c]
mov esi, str.C:Dev_fmodsrc374win_src_fsound.c
push 0x3de
push esi
mov ecx, dword [eax + 0x14e0]
add ecx, dword [eax + 0x14dc]
add ecx, dword [eax + 0x14d8]
mov dword [eax + 0x14d4], ecx
mov eax, dword [0x613e0c]
mov eax, dword [eax + 0x14f8]
shl eax, 2
push eax
push ebx
call fcn.0052186c
mov ecx, dword [0x613e0c]
add esp, 0x10
mov dword [ecx + 0x14f0], eax
mov eax, dword [0x613e0c]
cmp dword [eax + 0x14f0], ebx
je 0x51f421
mov ecx, dword [eax + 0x14ec]
push 0x3ea
add ecx, dword [eax + 0x14d4]
push esi
imul ecx, ecx, 0x1dc
push ecx
push ebx
call fcn.0052186c
mov ecx, dword [0x613e0c]
add esp, 0x10
mov dword [ecx + 0x14a8], eax
mov eax, dword [0x613e0c]
cmp dword [eax + 0x14a8], ebx
jne 0x51f430
mov dword [0x63d3c0], 0xc
jmp 0x51f7eb
mov dword [eax + 0x14c8], ebx
mov eax, dword [0x613e0c]
xor ebp, ebp
mov ecx, dword [eax + 0x14d8]
dec ecx
mov dword [eax + 0x14cc], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14cc]
inc ecx
mov dword [eax + 0x14b0], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14dc]
mov edx, dword [eax + 0x14b0]
lea ecx, [ecx + edx - 1]
mov dword [eax + 0x14b4], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14b4]
inc ecx
mov dword [eax + 0x14bc], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14e0]
mov edx, dword [eax + 0x14bc]
lea ecx, [ecx + edx - 1]
mov dword [eax + 0x14c0], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14bc]
mov dword [eax + 0x14c4], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14b0]
mov dword [eax + 0x14b8], ecx
mov eax, dword [0x613e0c]
mov ecx, dword [eax + 0x14c8]
mov dword [eax + 0x14d0], ecx
mov eax, dword [0x613e0c]
cmp dword [eax + 0x14d4], ebx
jle 0x51f5bc
mov dword [esp + 0x18], ebx
mov esi, dword [eax + 0x14a8]
add esi, dword [esp + 0x18]
push esi
mov dword [esi + 0x10], ebp
call fcn.00533d39
mov eax, dword [0x613e0c]
pop ecx
push esi
cmp ebp, dword [eax + 0x14d8]
jge 0x51f515
call fcn.0052fa8d
jmp 0x51f51a
mov eax, dword [eax]
call dword [eax + 0x1c]
fld1
xor eax, eax
pop ecx
fstp dword [esi + 0x7c]
fld1
inc eax
push esi
fstp dword [esi + 0xbc]
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x20], 0xac44
mov dword [esi + 0x1c], edi
mov dword [esi + 0x78], edi
mov dword [esi + 0x24], 0x80
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x94], ebx
mov dword [esi + 0xd4], ebx
mov dword [esi + 0xd8], eax
mov dword [esi + 0xc0], 0x49742400
call dword [esi + 0x180]
push esi
call dword [esi + 0x190]
push edi
push esi
call dword [esi + 0x19c]
push 0xac44
push esi
call dword [esi + 0x194]
push ebx
push 0x80
push esi
call dword [esi + 0x1a0]
mov eax, dword [0x613e0c]
add dword [esp + 0x3c], 0x1dc
add esp, 0x24
inc ebp
cmp ebp, dword [eax + 0x14d4]
jl 0x51f4ec
mov ebp, dword [eax + 0x14d4]
mov ecx, dword [eax + 0x14ec]
add ecx, ebp
cmp ebp, ecx
jge 0x51f623
mov ecx, ebp
imul ecx, ecx, 0x1dc
mov dword [esp + 0x18], ecx
jmp 0x51f5e0
mov ecx, dword [esp + 0x18]
mov esi, dword [eax + 0x14a8]
add esi, ecx
push esi
call fcn.00533d39
push esi
call fcn.0052798e
and dword [esi + 0x3c], 0xffffffbf
push esi
mov dword [esi + 0x10], ebp
call dword [esi + 0x180]
mov eax, dword [0x613e0c]
add dword [esp + 0x24], 0x1dc
add esp, 0xc
inc ebp
mov ecx, dword [eax + 0x14ec]
add ecx, dword [eax + 0x14d4]
cmp ebp, ecx
jl 0x51f5dc
cmp dword [eax + 0x14d8], ebx
je 0x51f74b
push 0x472
push str.C:Dev_fmodsrc374win_src_fsound.c
push 0x1dc
push ebx
call fcn.0052186c
mov ecx, dword [0x613e0c]
mov ebp, 0xfffffc18
mov dword [ecx + 0x14ac], eax
mov eax, dword [0x613e0c]
mov esi, dword [eax + 0x14ac]
push esi
mov dword [esi + 0x10], ebp
call fcn.00533d39
mov eax, dword [0x613e0c]
mov ecx, dword [eax]
push dword [eax + 0x14ac]
call dword [ecx + 0x1c]
push esi
call dword [esi + 0x180]
push esi
call dword [esi + 0x190]
push edi
push esi
call dword [esi + 0x19c]
push dword [esp + 0x3c]
push esi
call dword [esi + 0x194]
push ebx
push 0xffffffffffffffff
push esi
call dword [esi + 0x1a0]
mov eax, dword [esp + 0x58]
add esp, 0x3c
and eax, 4
mov dword [esi + 0xc0], 0x49742400
fld1
shl eax, 0x12
fstp dword [esi + 0xbc]
or eax, 0x80084012
mov esi, eax
call fcn.0051fa38
cmp eax, 9
je 0x51f6e3
call fcn.0051fa38
cmp eax, 8
je 0x51f6e3
or esi, 0x40
jmp 0x51f6e6
or esi, 0x20
mov eax, dword [0x613e0c]
push edi
push 0xffffffffffffffff
push edi
push dword [esp + 0x20]
push esi
push dword [eax + 0x40]
push 0xfffffffffffffffe
call fcn.0052830c
mov esi, eax
cmp esi, ebx
jne 0x51f711
mov eax, dword [0x613e0c]
mov byte [eax + 0x20], bl
jmp 0x51f7eb
push edi
push str.FSOUND_Primary_MixBuffer
push esi
call fcn.005214f0
mov byte [esi + 0xff], bl
mov eax, dword [0x613e0c]
add esp, 0xc
mov dword [eax + 0x14f4], esi
mov eax, dword [0x613e0c]
push esi
push ebp
mov byte [eax + 0x20], 1
call fcn.0051e64c
push 1
push ebp
call fcn.0051ee09
jmp 0x51f765
mov dword [eax + 0x14f4], ebx
mov eax, dword [0x613e0c]
mov dword [eax + 0x14ac], ebx
mov eax, dword [0x613e0c]
mov byte [eax + 0x20], 1
call fcn.00529720
call fcn.0052b2d0
call fcn.00534952
mov eax, dword [0x613e0c]
lea ecx, [eax + 0x299c]
mov esi, dword [ecx]
jmp 0x51f79e
push dword [esi + 0x5d8]
push esi
call fcn.00534077
mov eax, dword [0x613e0c]
mov esi, dword [esi]
pop ecx
pop ecx
lea ecx, [eax + 0x299c]
cmp esi, ecx
jne 0x51f783
cmp dword [eax + 0x14ac], ebx
je 0x51f7af
call fcn.0052f8e6
call fcn.0052e76d
mov eax, dword [0x613e0c]
cmp dword [eax + 4], 0xc
jne 0x51f7c3
or byte [eax + 9], 2
call fcn.0051a869
test al, al
jne 0x51f7d8
mov dword [0x63d3c0], 3
jmp 0x51f7eb
call fcn.0051f9a1
mov al, 1
jmp 0x51f7ed
mov dword [0x63d3c0], 0xe
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 0xc