Function at 0x47fb91
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 [0x537b40], ebx
jl 0x48017b
mov esi, dword [esp + 0x14]
cmp esi, 0xfa0
jl 0x48017b
cmp esi, 0xffff
jg 0x48017b
cmp edi, 0x400
jg 0x48017b
call fcn.0048018e
mov eax, dword [0x5122a4]
mov byte [eax + 0x20], bl
call sub.KERNEL32.DLL_GetCurrentThreadId
mov ecx, dword [0x5122a4]
mov ebp, 0xff
mov dword [ecx + 0x1c], eax
mov eax, dword [0x5122a4]
mov dword [0x537b40], ebx
mov ecx, dword [esp + 0x1c]
mov dword [eax + 0xaf4], 0x100
mov eax, dword [0x5122a4]
mov dword [eax + 0xad4], edi
mov eax, dword [0x5122a4]
mov dword [eax + 0x38], esi
mov eax, dword [0x5122a4]
mov dword [eax + 8], ecx
mov eax, dword [0x5122a4]
mov dword [eax + 0xae8], 0x10
mov eax, dword [0x5122a4]
mov dword [eax + 0x10], ebp
call fcn.00484a0d
call fcn.0047f6c4
mov eax, dword [0x5122a4]
push dword [eax + 4]
call fcn.0047fa32
mov eax, dword [0x5122a4]
push 1
pop edi
mov eax, dword [eax]
push esi
mov dword [eax], edi
mov eax, dword [0x5122a4]
mov eax, dword [eax]
mov dword [eax + 4], edi
mov eax, dword [0x5122a4]
mov byte [eax + 0xc], bl
mov eax, dword [0x5122a4]
mov eax, dword [eax]
call dword [eax + 0x10]
test al, al
pop ecx
je 0x480185
mov eax, dword [0x5122a4]
cmp dword [eax + 0xad8], ebx
je 0x47fcb1
mov eax, dword [eax]
call dword [eax + 0x30]
cmp al, bl
mov eax, dword [0x5122a4]
je 0x47fcb1
cmp dword [eax + 4], 2
jne 0x47fcb1
dec dword [eax + 0xad8]
mov eax, dword [0x5122a4]
mov edx, dword [eax + 0xae4]
lea ecx, [eax + 0xad8]
cmp dword [ecx], edx
jle 0x47fcc8
mov dword [ecx], edx
mov eax, dword [0x5122a4]
mov edx, dword [eax + 0xad8]
lea ecx, [eax + 0xad8]
cmp edx, dword [eax + 0xae0]
jge 0x47fce3
mov dword [ecx], ebx
mov eax, dword [0x5122a4]
mov edx, dword [eax + 0xae4]
lea ecx, [eax + 0xadc]
cmp dword [ecx], edx
jle 0x47fcfa
mov dword [ecx], edx
mov eax, dword [0x5122a4]
mov edx, dword [eax + 0xadc]
lea ecx, [eax + 0xadc]
cmp edx, dword [eax + 0xae0]
jge 0x47fd15
mov dword [ecx], ebx
mov eax, dword [0x5122a4]
cmp dword [eax + 0xad8], edi
jge 0x47fd26
mov eax, dword [eax]
mov dword [eax], ebx
mov eax, dword [0x5122a4]
cmp dword [eax + 0xadc], edi
jge 0x47fd38
mov eax, dword [eax]
mov dword [eax + 4], ebx
mov eax, dword [0x5122a4]
cmp dword [eax + 0x3c], 0xffffffff
jne 0x47fd5d
cmp dword [eax + 4], edi
je 0x47fd51
cmp byte [eax + 0xc], bl
jne 0x47fd51
mov dword [eax + 0x3c], 0x32
jmp 0x47fd58
mov dword [eax + 0x3c], 0x64
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0x3c]
mov dword [eax + 0x4c], ecx
mov eax, dword [0x5122a4]
shl dword [eax + 0x3c], 1
call fcn.00486803
test al, al
je 0x480185
mov eax, dword [0x5122a4]
mov esi, str.F:WorkMediaChanceMMBuilderFMOD_src_fsound.c
push 0x3ea
push esi
mov ecx, dword [eax + 0xadc]
add ecx, dword [eax + 0xad8]
add ecx, dword [eax + 0xad4]
mov dword [eax + 0xad0], ecx
mov eax, dword [0x5122a4]
mov eax, dword [eax + 0xaf4]
shl eax, 2
push eax
push ebx
call fcn.00485aeb
mov ecx, dword [0x5122a4]
add esp, 0x10
mov dword [ecx + 0xaec], eax
mov eax, dword [0x5122a4]
cmp dword [eax + 0xaec], ebx
je 0x47fe0c
mov ecx, dword [eax + 0xae8]
push 0x3f6
add ecx, dword [eax + 0xad0]
push esi
imul ecx, ecx, 0x1ac
push ecx
push ebx
call fcn.00485aeb
mov ecx, dword [0x5122a4]
add esp, 0x10
mov dword [ecx + 0xaa4], eax
mov eax, dword [0x5122a4]
cmp dword [eax + 0xaa4], ebx
jne 0x47fe1b
mov dword [0x537b40], 0xc
jmp 0x480185
mov dword [eax + 0xac4], ebx
mov eax, dword [0x5122a4]
xor edi, edi
mov ecx, dword [eax + 0xad4]
dec ecx
mov dword [eax + 0xac8], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xac8]
inc ecx
mov dword [eax + 0xaac], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xad8]
mov edx, dword [eax + 0xaac]
lea ecx, [ecx + edx - 1]
mov dword [eax + 0xab0], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xab0]
inc ecx
mov dword [eax + 0xab8], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xadc]
mov edx, dword [eax + 0xab8]
lea ecx, [ecx + edx - 1]
mov dword [eax + 0xabc], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xab8]
mov dword [eax + 0xac0], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xaac]
mov dword [eax + 0xab4], ecx
mov eax, dword [0x5122a4]
mov ecx, dword [eax + 0xac4]
mov dword [eax + 0xacc], ecx
mov eax, dword [0x5122a4]
cmp dword [eax + 0xad0], ebx
jle 0x47ff91
mov dword [esp + 0x18], ebx
mov esi, dword [eax + 0xaa4]
add esi, dword [esp + 0x18]
push esi
mov dword [esi + 0xc], edi
call fcn.00488644
mov eax, dword [0x5122a4]
pop ecx
cmp edi, dword [eax + 0xad4]
jge 0x47ff00
push esi
call fcn.00486d08
jmp 0x47ff06
mov eax, dword [eax]
push esi
call dword [eax + 0x1c]
pop ecx
mov dword [esi + 0x14], 1
fld1
push esi
mov dword [esi + 0x10], ebx
fstp dword [esi + 0x7c]
mov dword [esi + 0x54], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x1c], 0xac44
mov dword [esi + 0x18], ebp
mov dword [esi + 0x78], ebp
mov dword [esi + 0x20], 0x80
mov dword [esi + 0x34], ebx
mov dword [esi + 0x94], ebx
call dword [esi + 0x15c]
push esi
call dword [esi + 0x16c]
push ebp
push esi
call dword [esi + 0x178]
push 0xac44
push esi
call dword [esi + 0x170]
push ebx
push 0x80
push esi
call dword [esi + 0x17c]
mov eax, dword [0x5122a4]
add dword [esp + 0x3c], 0x1ac
add esp, 0x24
inc edi
cmp edi, dword [eax + 0xad0]
jl 0x47fed7
mov edi, dword [eax + 0xad0]
mov ecx, dword [eax + 0xae8]
add ecx, edi
cmp edi, ecx
jge 0x47fff8
mov ecx, edi
imul ecx, ecx, 0x1ac
mov dword [esp + 0x18], ecx
jmp 0x47ffb5
mov ecx, dword [esp + 0x18]
mov esi, dword [eax + 0xaa4]
add esi, ecx
push esi
call fcn.00488644
push esi
call fcn.0048a5e5
and dword [esi + 0x34], 0xffffffbf
push esi
mov dword [esi + 0xc], edi
call dword [esi + 0x15c]
mov eax, dword [0x5122a4]
add dword [esp + 0x24], 0x1ac
add esp, 0xc
inc edi
mov ecx, dword [eax + 0xae8]
add ecx, dword [eax + 0xad0]
cmp edi, ecx
jl 0x47ffb1
cmp dword [eax + 0xad4], ebx
je 0x480106
push 0x46f
push str.F:WorkMediaChanceMMBuilderFMOD_src_fsound.c
push 0x1ac
push ebx
call fcn.00485aeb
mov ecx, dword [0x5122a4]
mov edi, 0xfffffc18
mov dword [ecx + 0xaa8], eax
mov eax, dword [0x5122a4]
mov esi, dword [eax + 0xaa8]
push esi
mov dword [esi + 0xc], edi
call fcn.00488644
mov eax, dword [0x5122a4]
mov ecx, dword [eax]
push dword [eax + 0xaa8]
call dword [ecx + 0x1c]
push esi
call dword [esi + 0x15c]
push esi
call dword [esi + 0x16c]
push ebp
push esi
call dword [esi + 0x178]
push dword [esp + 0x3c]
push esi
call dword [esi + 0x170]
push ebx
push 0xffffffffffffffff
push esi
call dword [esi + 0x17c]
mov eax, dword [esp + 0x58]
add esp, 0x3c
and eax, 4
shl eax, 0x12
or eax, 0x80084012
mov esi, eax
call fcn.0048037f
cmp eax, 9
je 0x4800a6
call fcn.0048037f
cmp eax, 8
je 0x4800a6
or esi, 0x40
jmp 0x4800a9
or esi, 0x20
mov eax, dword [0x5122a4]
push ebp
push 0xffffffffffffffff
push ebp
push dword [esp + 0x20]
push esi
push dword [eax + 0x40]
push 0xfffffffffffffffe
call fcn.00489bd7
mov esi, eax
cmp esi, ebx
jne 0x4800d4
mov eax, dword [0x5122a4]
mov byte [eax + 0x20], bl
jmp 0x480185
push str.FSOUND_Primary_MixBuffer
push esi
call fcn.004b4df0
mov eax, dword [0x5122a4]
pop ecx
pop ecx
mov dword [eax + 0xaf0], esi
mov eax, dword [0x5122a4]
mov byte [eax + 0x20], 1
push esi
push edi
call fcn.0048414f
push 1
push edi
call fcn.00484818
jmp 0x480120
mov dword [eax + 0xaf0], ebx
mov eax, dword [0x5122a4]
mov dword [eax + 0xaa8], ebx
mov eax, dword [0x5122a4]
mov byte [eax + 0x20], 1
call fcn.00488d80
call fcn.004888bf
mov esi, dword [0x5122f8]
mov edi, 0x5122f8
cmp esi, edi
je 0x48014b
push dword [esi + 0x5c0]
push esi
call fcn.0048053f
mov esi, dword [esi]
pop ecx
pop ecx
jmp 0x480135
mov eax, dword [0x5122a4]
cmp dword [eax + 0xad4], ebx
je 0x48015d
call fcn.00486b50
call fcn.0048161f
test al, al
jne 0x480172
mov dword [0x537b40], 3
jmp 0x480185
call fcn.0048030c
mov al, 1
jmp 0x480187
mov dword [0x537b40], 0xe
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 0xc