Function at 0x498031
Capabilities:
Create thread

Disassembly:
mov eax, 0x4f1e47
call fcn.004ebd20
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, esi
call fcn.00497605
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], 0x500308
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.00404299
mov eax, dword [ebp + 0xc]
call fcn.0049e88c
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 0x498337
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.0049749f
test eax, eax
jne 0x49811d
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x8007000e
jmp 0x498334
mov eax, dword [ebp + 0xc]
call fcn.00404578
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 0x498334
cmp dword [ebp + 0x18], 0
je 0x49817e
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 0x498334
jmp 0x498188
mov esi, dword [ebp - 0x10]
xor edi, edi
call fcn.00403be9
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.00403be9
xor esi, esi
mov dword [ebx + 0x60], esi
cmp dword [0x522828], esi
je 0x49826b
push 0x206b8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, esi
pop ecx
je 0x498236
push eax
call fcn.004976ef
mov edi, eax
jmp 0x498238
xor edi, edi
cmp edi, esi
mov dword [ebx + 0x60], edi
je 0x49826b
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 [0x522828]
dec ecx
fstp qword [esp]
push 1
push eax
movzx eax, word [edx + 2]
push dword [edx + 4]
call fcn.00497709
xor esi, esi
push esi
push dword [ebx + 0xa8]
push ebx
call fcn.00498527
mov eax, dword [ebp - 0x24]
cmp dword [eax], 1
jne 0x49829a
push 0x34
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, esi
pop ecx
je 0x498293
call fcn.004997d2
jmp 0x498295
xor eax, eax
mov dword [ebx + 0x64], eax
jmp 0x49829d
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 0x498f7c
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 0x49832b
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [ebp + 0x1c]
mov dword [eax], esi
jmp 0x498334
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