Function at 0x401920
Capabilities:
Create thread
Enumerate pe sections
Print debug messages

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push edi
mov edi, ecx
mov eax, dword [edi + 8]
lea ebx, [edi + 8]
xor ebp, ebp
cmp eax, ebp
je 0x40193e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebx], ebp
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push ebp
push ebx
push ebp
mov dword [edi + 0x10], eax
call sub.DSOUND.dll_DirectSoundCreate
test eax, eax
jge 0x40196d
push str.DirectSoundCreate_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push 2
push 0x10014
push eax
call edx
test eax, eax
jge 0x401998
push str.SetCooperativeLevel_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
xor eax, eax
push ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [ebx]
lea edx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x3c], 0x24
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], ebp
mov dword [esp + 0x4c], ebp
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jge 0x401a09
push str.CreateSoundBuffer_error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
xor eax, eax
push esi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov word [esp + 0x34], ax
movzx eax, word [esi + 4]
cmp eax, 8
je 0x401a3a
mov edx, 0x10
cmp eax, 0x8008
jne 0x401a3f
mov edx, 8
movzx ax, byte [esi + 6]
mov word [esp + 0x26], ax
mov ecx, dword [esi]
movzx eax, ax
mov word [esp + 0x32], dx
movzx edx, dx
imul eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov word [esp + 0x30], ax
movzx eax, ax
imul eax, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x14]
xor ecx, ecx
mov word [esp + 0x34], cx
mov dword [0x411244], eax
mov ecx, dword [esi + 0x10]
mov eax, dword [esp + 0x10]
mov dword [0x411240], ecx
mov edx, 1
mov word [esp + 0x24], dx
mov edx, dword [eax]
mov edx, dword [edx + 0x38]
lea ecx, [esp + 0x24]
push ecx
push eax
call edx
test eax, eax
jge 0x401ac3
push str.SetFormat_error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x401ad7
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x10], ebp
cmp word [esi + 8], bp
jne 0x401b0a
mov ecx, dword [esi]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x2e
mov ecx, 1
cmp eax, ecx
jle 0x401b06
lea esp, [esp]
add ecx, ecx
cmp ecx, eax
jl 0x401b00
mov word [esi + 8], cx
movzx eax, word [esi + 8]
movzx ecx, word [esp + 0x30]
imul eax, ecx
mov dword [edi + 0xc], eax
add eax, eax
add eax, eax
mov dword [edi + 0x34], eax
cmp eax, ebp
ja 0x401b2b
mov dword [edi + 0x34], 0x10000
mov edx, dword [edi + 0x34]
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
push ebp
mov dword [esp + 0x44], edx
lea eax, [esp + 0x28]
mov dword [esp + 0x4c], eax
mov eax, dword [ebx]
lea esi, [edi + 4]
push esi
lea edx, [esp + 0x40]
mov dword [esp + 0x40], 0x24
mov dword [esp + 0x44], 0x180a0
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jge 0x401b9f
push str.CreateSoundBuffer_error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
mov eax, dword [esi]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], ebp
cmp eax, ebp
je 0x401bf8
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x24]
push edx
mov edx, dword [edi + 0x34]
push edx
push ebp
push eax
mov eax, dword [ecx + 0x2c]
call eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
push ebp
push edx
call sub.MSVCR90.dll_memset
mov edx, dword [esp + 0x24]
mov eax, dword [esi]
mov ecx, dword [eax]
add esp, 0xc
push ebp
push ebp
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [ecx + 0x4c]
call eax
mov esi, dword [esi]
mov ecx, dword [esi]
mov edx, dword [ecx + 0x20]
lea ebx, [edi + 0x40]
push ebx
push esi
call edx
cmp dword [ebx], ebp
ja 0x401c21
push str.GetFrequency_error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
mov eax, dword [edi + 0x10]
push 0x11
push ebp
push eax
push 0xa
push 0x14
call dword [sym.imp.WINMM.dll_timeSetEvent]
mov dword [edi + 0x3c], eax
cmp dword [edi + 0x1c], ebp
jne 0x401c71
lea ecx, [edi + 0x18]
push ecx
push ebp
push edi
push 0x401900
push ebp
push ebp
mov dword [edi + 0x20], ebp
call dword [sym.imp.MSVCR90.dll__beginthreadex]
add esp, 0x18
mov dword [edi + 0x1c], eax
cmp eax, ebp
jne 0x401c71
push str._beginthreadex_error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 8
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x4c
ret 8