Function at 0x497992
Capabilities:
Create thread

Disassembly:
mov eax, 0x4ed454
call fcn.004eadec
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, esi
call fcn.00496f65
xor edi, edi
mov dword [ebp - 4], edi
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esi + 0x20]
push eax
mov dword [esi], 0x4ff350
call ebx
lea eax, [esi + 0x38]
push eax
call ebx
lea eax, [esi + 0x50]
mov dword [ebp - 0x20], eax
mov dword [eax], edi
lea eax, [esi + 0x54]
mov dword [ebp - 0x1c], eax
mov dword [eax], edi
lea eax, [esi + 0x58]
mov dword [ebp - 0x10], eax
mov dword [eax], edi
lea eax, [esi + 0x6c]
mov dword [ebp - 0x18], eax
mov dword [eax + 4], edi
mov dword [eax], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
lea eax, [esi + 0x7c]
mov dword [eax], edi
mov dword [eax + 4], edi
mov ebx, dword [ebp + 0x14]
mov byte [ebp - 4], 7
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0xc8], edi
mov dword [esi + 0xd0], edi
mov dword [esi + 0xd4], edi
lea edi, [esi + 0x18]
mov dword [ebp - 0x14], edi
call fcn.0040480c
mov eax, dword [ebp + 0xc]
call fcn.0049e34d
mov edi, dword [ebp + 0x10]
lea ebx, [esi + 0x90]
push ebx
mov dword [esi + 0x14], eax
mov eax, dword [edi]
push edi
mov dword [ebp + 0x14], ebx
call dword [eax + 0x28]
test eax, eax
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
jl 0x497c98
mov eax, dword [edi]
add esi, 0x1c
push esi
push edi
mov dword [ebp - 0x24], esi
call dword [eax + 0xc]
mov eax, dword [ebx]
mov esi, dword [ebp - 0x18]
call fcn.00496dff
test eax, eax
jne 0x497a7e
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x8007000e
jmp 0x497c95
mov eax, dword [ebp + 0xc]
call fcn.00404ae6
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
movzx ecx, word [ecx + 0xe]
mov edx, eax
shr edx, 3
shr ecx, 3
imul ecx, edx
mov edx, dword [ebp + 8]
push eax
push dword [ebp - 0x1c]
mov dword [edx + 0x94], ecx
call sym.TTPlayer.exe_CreateSoundBuffer
test eax, eax
mov esi, dword [ebp + 0x1c]
mov dword [esi], eax
jl 0x497c95
cmp dword [ebp + 0x18], 0
je 0x497adf
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x94]
shl eax, 1
push eax
push dword [ebp - 0x10]
call sym.TTPlayer.exe_CreateSoundBuffer
test eax, eax
mov dword [esi], eax
jl 0x497c95
jmp 0x497ae9
mov esi, dword [ebp - 0x10]
xor edi, edi
call fcn.00403cd4
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx]
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0x20]
xor eax, eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x9c], eax
mov dword [ebx + 0xb0], eax
mov eax, 0x320
mov dword [ebx + 0xbc], eax
mov dword [ebx + 0xc0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xa0], ecx
mov dword [ebx + 0xa4], 0x64
mov dword [ebx + 0xa8], 0xf
mov dword [ebx + 0xac], 1
mov dword [ebx + 0xb4], 0x12c
mov dword [ebx + 0xb8], 0x1f4
mov dword [ebx + 0x5c], eax
call fcn.00403cd4
xor esi, esi
mov dword [ebx + 0x60], esi
cmp dword [0x521828], esi
je 0x497bcc
push 0x206b8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, esi
pop ecx
je 0x497b97
push eax
call fcn.0049704f
mov edi, eax
jmp 0x497b99
xor edi, edi
cmp edi, esi
mov dword [ebx + 0x60], edi
je 0x497bcc
mov eax, dword [ebp - 0x14]
fld qword [str._np_n]
mov edx, dword [eax]
movzx eax, word [edx + 0xe]
push ecx
push ecx
mov ecx, dword [0x521828]
dec ecx
fstp qword [esp]
push 1
push eax
movzx eax, word [edx + 2]
push dword [edx + 4]
call fcn.00497069
xor esi, esi
push esi
push dword [ebx + 0xa8]
push ebx
call fcn.00497e88
mov eax, dword [ebp - 0x24]
cmp dword [eax], 1
jne 0x497bfb
push 0x34
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, esi
pop ecx
je 0x497bf4
call fcn.00499136
jmp 0x497bf6
xor eax, eax
mov dword [ebx + 0x64], eax
jmp 0x497bfe
mov dword [ebx + 0x64], esi
call sub.ttpcomm.dll_Ordinal_105
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push esi
push esi
push 1
push esi
mov dword [ebx + 0x68], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0xd0], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0xd4], eax
mov dword [ebx + 0xe0], esi
mov dword [ebx + 0xe4], 1
mov dword [ebx + 0xc4], esi
mov dword [ebx + 0xcc], esi
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0xd8], eax
call edi
mov dword [ebx + 0xdc], eax
lea eax, [ebp - 0x28]
push eax
push esi
push ebx
push 0x4988e0
push esi
push esi
mov dword [ebp - 0x28], esi
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
cmp eax, esi
mov dword [ebx + 0xc8], eax
je 0x497c8c
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [ebp + 0x1c]
mov dword [eax], esi
jmp 0x497c95
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x80004005
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18