Function at 0x402dd0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x110
lea eax, [esi + 0x40]
push eax
push 0x40c250
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x3c]
xor edi, edi
add esp, 0xc
cmp word [0x40c256], di
lea ebx, [eax + esi + 0x3c]
mov dword [ebp - 4], edi
jbe 0x402ef0
mov eax, dword [ebp - 4]
lea esi, [eax + eax*2]
add ebx, 5
mov ax, word [ebx]
inc ebx
lea esi, [esi*2 + 0x40c360]
mov word [esi + 4], ax
movzx ecx, word [0x40c254]
inc ebx
mov ax, word [ebx]
mov word [ebp - 8], ax
movzx eax, word [esi + 4]
imul eax, ecx
push 5
inc ebx
push eax
inc ebx
call dword [sym.imp.MSVCRT.dll_calloc]
cmp word [ebp - 8], di
pop ecx
pop ecx
mov dword [esi], eax
je 0x402edd
movzx ecx, word [0x40c254]
and dword [ebp - 8], 0
mov edi, eax
movzx eax, word [esi + 4]
imul eax, ecx
test eax, eax
jbe 0x402edb
mov al, byte [ebx]
inc ebx
test al, al
jns 0x402ea4
test al, 1
je 0x402e7a
mov cl, byte [ebx]
mov byte [edi], cl
inc ebx
test al, 2
je 0x402e84
mov cl, byte [ebx]
mov byte [edi + 1], cl
inc ebx
test al, 4
je 0x402e8e
mov cl, byte [ebx]
mov byte [edi + 2], cl
inc ebx
test al, 8
je 0x402e98
mov cl, byte [ebx]
mov byte [edi + 3], cl
inc ebx
test al, 0x10
je 0x402eba
mov al, byte [ebx]
mov byte [edi + 4], al
inc ebx
jmp 0x402eba
je 0x402ea8
mov byte [edi], al
push 4
lea eax, [edi + 1]
push ebx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add ebx, 4
cmp byte [edi], 0x61
jne 0x402ec2
mov byte [edi], 0xff
movzx eax, word [esi + 4]
movzx ecx, word [0x40c254]
inc dword [ebp - 8]
imul eax, ecx
add edi, 5
cmp dword [ebp - 8], eax
jb 0x402e6a
xor edi, edi
movzx eax, word [0x40c256]
inc dword [ebp - 4]
cmp dword [ebp - 4], eax
jb 0x402e0b
xor esi, esi
cmp word [0x40c258], di
mov dword [ebp - 4], esi
jbe 0x40311c
mov edi, dword [ebx]
sub edi, dword [ebp + 8]
lea esi, [esi + esi*4]
shl esi, 6
add esi, 0x40c960
push 0x1d
lea eax, [esi + 0x43]
push ebx
add edi, ebx
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp word [esi + 0x5e], 0
je 0x4030ef
push 0xdf
add ebx, 0x1d
lea eax, [esi + 0x60]
push ebx
push eax
call sub.MSVCRT.dll_memcpy
shl word [esi + 0x132], 1
add esp, 0xc
cmp byte [esi + 0x124], 2
jae 0x402f61
mov byte [esi + 0x12c], 0
cmp byte [esi + 0x125], 2
jae 0x402f71
mov byte [esi + 0x12d], 0
mov eax, dword [ebp + 8]
lea ebx, [edi + eax]
xor edi, edi
cmp word [esi + 0x5e], di
jbe 0x403028
push 0x44
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
mov eax, dword [ebp - 8]
push 0x28
push ebx
push esi
mov dword [eax + edi*4], esi
call sub.MSVCRT.dll_memcpy
mov al, byte [esi + 0xe]
add esp, 0x14
add ebx, 0x28
test al, 1
mov byte [esi + 0x2c], 1
mov byte [esi + 0x2d], 8
je 0x402fb7
mov byte [esi + 0x2c], 2
test al, 2
je 0x402fc7
mov cl, byte [esi + 0x2c]
and cl, 0xfc
or cl, 4
mov byte [esi + 0x2c], cl
test byte [esi + 0x2c], 1
je 0x402fd6
mov ecx, dword [esi]
and dword [esi + 4], 0
mov dword [esi + 8], ecx
test al, 0x10
je 0x402fe6
shr dword [esi], 1
shr dword [esi + 4], 1
shr dword [esi + 8], 1
mov byte [esi + 0x2d], 0x10
cmp dword [esi + 8], 0
jne 0x402ff9
mov eax, dword [esi]
and dword [esi + 4], 0
mov dword [esi + 8], eax
mov byte [esi + 0x2c], 1
mov eax, dword [esi]
test eax, eax
je 0x403010
add eax, 8
push 2
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
pop ecx
pop ecx
mov dword [esi + 0x30], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x5e]
inc edi
cmp edi, eax
jb 0x402f83
cmp edi, 0x10
mov esi, dword [ebp - 8]
jae 0x403039
push 0x10
lea edx, [esi + edi*4]
pop ecx
sub ecx, edi
mov eax, 0x40afc8
mov edi, edx
rep stosd dword es:[edi], eax
and dword [ebp - 8], 0
cmp word [esi + 0x5e], 0
jbe 0x403104
mov eax, dword [ebp - 8]
mov edi, dword [esi + eax*4]
mov ecx, dword [edi]
test ecx, ecx
je 0x4030dd
cmp byte [edi + 0x2d], 8
jne 0x40307c
mov eax, dword [edi + 0x30]
xor edx, edx
test ecx, ecx
jbe 0x403076
xor ecx, ecx
mov ch, byte [ebx]
mov word [eax], cx
inc eax
inc eax
inc ebx
inc edx
cmp edx, dword [edi]
jb 0x403067
mov byte [edi + 0x2d], 0x10
jmp 0x403091
lea eax, [ecx + ecx]
push eax
push ebx
push dword [edi + 0x30]
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi]
add esp, 0xc
lea ebx, [ebx + eax*2]
mov eax, dword [edi + 0x30]
xor edx, edx
xor ecx, ecx
cmp dword [edi], edx
jbe 0x4030ab
add word [eax], cx
xor ecx, ecx
mov cx, word [eax]
inc eax
inc eax
inc edx
cmp edx, dword [edi]
jb 0x40309c
mov cl, byte [edi + 0x2c]
cmp cl, 4
mov eax, dword [edi + 0x30]
jne 0x4030c8
mov ecx, dword [edi + 8]
add ecx, dword [edi + 4]
lea eax, [eax + ecx*2]
mov cx, word [eax - 2]
mov word [eax], cx
jmp 0x4030dd
cmp cl, 2
jne 0x4030dd
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
add edx, ecx
mov cx, word [eax + ecx*2]
mov word [eax + edx*2], cx
movzx eax, word [esi + 0x5e]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jb 0x403048
jmp 0x403104
push 0x10
mov eax, 0x40afc8
pop ecx
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
lea ebx, [eax + ecx]
mov esi, dword [ebp - 4]
movzx eax, word [0x40c258]
inc esi
cmp esi, eax
mov dword [ebp - 4], esi
jb 0x402f02
xor edi, edi
mov esi, 0x5800
push esi
push edi
mov ebx, 0x4169c0
push ebx
mov dword [0x41c218], 0x80
mov dword [0x41c21c], 0x3c000000
call sub.MSVCRT.dll_memset
add esp, 0xc
xor ecx, ecx
xor eax, eax
mov dword [eax + 0x4169c0], ecx
mov dword [eax + 0x4169f4], 1
add eax, 0x58
inc ecx
cmp eax, esi
jb 0x403149
movzx eax, word [0x40c25c]
or dword [0x416970], 0xffffffff
or dword [0x416974], 0xffffffff
mov dword [0x416964], eax
movzx eax, word [0x40c25e]
push eax
mov dword [ebp - 4], ecx
mov dword [0x416960], 0x40
mov dword [0x416968], edi
mov dword [0x41696c], edi
mov dword [0x416978], edi
mov dword [0x41697c], edi
mov dword [0x416980], edi
mov dword [0x416984], edi
call fcn.004043b1
movzx eax, word [0x40c254]
imul eax, eax, 0x88
push eax
push edi
push 0x40b150
call sub.MSVCRT.dll_memset
movzx eax, word [0x40c254]
add esp, 0xc
cmp eax, edi
mov dword [ebp - 4], edi
jbe 0x4031f9
mov ecx, 0x40b154
mov dword [ebp - 4], eax
mov dword [ecx], ebx
add ebx, 0x58
add ecx, 0x88
dec eax
jne 0x4031eb
push edi
push edi
push edi
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
push 0x4169b8
mov word [ebp - 0x20], 1
mov word [ebp - 0x1e], 2
mov dword [ebp - 0x1c], 0xac44
mov dword [ebp - 0x18], 0x2b110
mov word [ebp - 0x14], 4
mov word [ebp - 0x12], 0x10
mov word [ebp - 0x10], di
call dword [sym.imp.WINMM.dll_waveOutOpen]
mov ebx, dword [sym.imp.MSVCRT.dll_calloc]
push 1
mov esi, 0x56540
push esi
call ebx
or dword [0x4169a8], 0xffffffff
pop ecx
pop ecx
mov dword [0x416998], esi
push 0x20
mov esi, 0x416994
push esi
push dword [0x4169b8]
mov dword [0x4169b4], eax
mov dword [0x4169a4], 0xc
mov dword [0x416994], eax
mov dword [0x41699c], edi
mov dword [0x4169a0], edi
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 1
push 0xacb80
call ebx
mov dword [0x416990], eax
add eax, 0xf
pop ecx
and eax, 0xfffffff0
pop ecx
mov dword [0x4169bc], eax
call fcn.00403401
cmp dword [0x41c1cc], edi
jne 0x4032a5
push 0x20
push esi
push dword [0x4169b8]
call dword [sym.imp.WINMM.dll_waveOutWrite]
lea eax, [ebp - 4]
push eax
push edi
push edi
push 0x4034dc
push edi
push edi
mov dword [0x41c1c4], 1
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push 0xf
push eax
mov dword [0x41c1c0], eax
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
pop edi
pop esi
pop ebx
leave
ret 4