Function at 0x40d950
Capabilities:
Create thread
Read .ini file

Disassembly:
sub esp, 0x668
mov eax, dword [0x442abc]
xor eax, esp
mov dword [esp + 0x664], eax
mov eax, dword [esp + 0x66c]
push ebp
mov ebp, dword [esp + 0x674]
cmp ebp, 0xffffffff
push esi
push edi
mov dword [esp + 0x14], ecx
mov ecx, 0xd
lea esi, [esp + 0x688]
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x6bc]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edx
jne 0x40da14
lea eax, [esp + 0x28]
push 0x43bc7c
push eax
call section..text
add esp, 8
test eax, eax
je 0x40d9d7
mov ebp, 0x19
mov eax, dword [esp + 0x680]
cmp eax, 0xffffffff
jne 0x40da22
mov dword [esp + 0x680], 2
jmp 0x40da2b
lea ecx, [esp + 0x28]
push 0x43bc8c
push ecx
call section..text
add esp, 8
test eax, eax
je 0x40d9f4
mov ebp, 0x20
jmp 0x40d9be
lea edx, [esp + 0x28]
push 0x43bc9c
push edx
call section..text
add esp, 8
mov ebp, eax
neg ebp
sbb ebp, ebp
and ebp, 7
add ebp, 0x19
jmp 0x40d9be
test ebp, ebp
jne 0x40d9be
mov eax, 3
jmp 0x40dbd8
test eax, eax
je 0x40da18
cmp eax, 1
je 0x40da18
lea eax, [esp + 0x28]
push 0x43bc7c
push eax
call section..text
add esp, 8
test eax, eax
mov edi, 0x4099a0
je 0x40da58
test esi, esi
mov dword [esp + 0xc], 0x4083b0
je 0x40da5c
cmp dword [esi + 4], 0
je 0x40da5c
mov dword [esp + 0xc], edi
push 0x104
lea ecx, [esp + 0x5c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40dacb
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.CTAudMon.ini
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x268]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [esp + 0x260]
push ecx
push 0
push str.AudioFormat
push str.InputFormatAssumption
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x40dacb
mov dword [esp + 0xc], edi
push ebx
push 0x144
call fcn.00418905
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 4
mov ebx, eax
push edx
mov dword [ebx], 0x144
call esi
mov edi, dword [sym.imp.ole32.dll_CoTaskMemAlloc]
lea eax, [eax + eax + 2]
push eax
call edi
test eax, eax
mov dword [ebx + 4], eax
je 0x40db0e
mov ecx, dword [esp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, dword [esp + 0x18]
push edx
call esi
lea eax, [eax + eax + 2]
push eax
call edi
xor esi, esi
cmp eax, esi
mov dword [ebx + 8], eax
je 0x40db31
mov ecx, dword [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push esi
push 1
push esi
mov dword [ebx + 0x10], 1
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, esi
mov dword [ebx + 0x14], eax
je 0x40db51
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [esp + 0x684]
fld dword [esp + 0x6c4]
mov eax, dword [esp + 0x688]
fstp dword [ebx + 0x140]
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x20], esi
lea edi, [ebx + 0x38]
mov ecx, 0xd
lea esi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
lea edi, [ebx + 0x138]
mov dword [ebx + 0x24], ebp
mov dword [ebx + 0x28], edx
mov dword [ebx + 0x2c], eax
call fcn.0040d190
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x24]
push ecx
push 0
push ebx
push edx
push 0
push 0
mov dword [ebx + 0x13c], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
jne 0x40dbf2
mov esi, 0x80004005
push ebx
call fcn.00418935
add esp, 4
mov eax, esi
call fcn.00406530
pop ebx
mov ecx, dword [esp + 0x670]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004217dd
add esp, 0x668
ret 0x4c
cmp dword [ebx + 0x20], 0
jne 0x40dc0a
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
push 0xa
call edi
cmp dword [ebx + 0x20], 0
je 0x40dc00
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40dc15
mov esi, eax
jmp 0x40dbc7
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0xc], esi
mov dword [eax], ebx
xor eax, eax
jmp 0x40dbd7