Function at 0x401000
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x4407b8
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dl, byte [ecx + 0x44]
test edx, edx
je 0x40108b
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 0x40104d
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 2
jge 0x40106f
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 0x401044
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 0x4010e5
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 0x4010b6
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 2
jge 0x4010d8
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 0x4010ad
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 0x4010f7
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 2
jge 0x401163
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 fcn.00433c4d
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 fcn.00433c4d
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 fcn.00433c4d
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 fcn.00433c4d
add esp, 4
jmp 0x4010ee
btr ebx, 0xf4
xadd eax, ebx
xchg ebx, eax
test eax, 0x534f82bb
sub bl, dl
mov eax, edx
xchg al, bl
mov al, cl
movzx ebx, bx
not bh
rcl ebx, 0x4b
or eax, 0x393eeb01
imul ebx, ebp, 0x5a429437
movzx eax, si
mov eax, 0xfc226531
test ebx, edx
sub bh, 0x82
test bl, al
bsr eax, ebp
shr ebx, 1
imul ebx, eax, 0xd815a07e
sbb al, 0x7b
test edi, edi
shl bl, cl
movsx ebx, dx
neg bl
bswap ebx
add ah, al
not eax
xadd bl, al
shrd ebx, eax, cl
movzx eax, cx
mov bl, 0x5d
imul ebx, esi, 0x9c792c83
neg ah
movzx ebx, dh
inc eax
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]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret