Function at 0x10001165
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x1007f770
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dl, byte [ecx + 0x44]
test edx, edx
je 0x100011ed
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x18]
push ecx
call dword [sym.imp.WINMM.dll_waveInStop]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x18]
push eax
call dword [sym.imp.WINMM.dll_waveInReset]
mov dword [ebp - 8], 0
jmp 0x100011af
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 2
jge 0x100011d1
push 0x20
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edx*4 + 0x30]
push ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x18]
push eax
call dword [sym.imp.WINMM.dll_waveInUnprepareHeader]
jmp 0x100011a6
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x18]
push edx
call dword [sym.imp.WINMM.dll_waveInClose]
push 0xffffffffffffffff
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx + 0x45]
test eax, eax
je 0x10001247
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x40]
push edx
call dword [sym.imp.WINMM.dll_waveOutReset]
mov dword [ebp - 0xc], 0
jmp 0x10001218
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 2
jge 0x1000123a
push 0x20
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + ecx*4 + 0x30]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x40]
push edx
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
jmp 0x1000120f
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
push ecx
call dword [sym.imp.WINMM.dll_waveOutClose]
mov dword [ebp - 4], 0
jmp 0x10001259
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 2
jge 0x100012c5
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + eax*4 + 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + ecx*4 + 0x30]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edx*4 + 0x10]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + eax*4 + 0x38]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x10001250
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret