Function at 0x406b60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x178
push ebx
push ebp
push esi
push edi
call fcn.004066b0
mov eax, dword [0x634b14]
test eax, eax
jne 0x40708e
call fcn.004067d0
mov eax, dword [0x634b14]
test eax, eax
jne 0x40708e
call fcn.00422660
mov ecx, 0x6694d0
mov dword [esp + 0x28], eax
call fcn.0043d530
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp + 0x2c], eax
push str.demo_title.rom
push 0x66c0e4
lea eax, [esp + 0x8c]
push str._s_s
push eax
call edi
lea ecx, [esp + 0x94]
push ecx
call fcn.00401070
push str.musicdemo.wav
push 0x66c0e4
lea edx, [esp + 0xa0]
push str._s_s
push edx
mov esi, eax
call edi
add esp, 0x24
lea eax, [esp + 0x84]
mov ecx, 0x6694d0
push eax
call fcn.0043ced0
push str.demo_snd_demo.rom
push 0x66c0e4
lea ecx, [esp + 0x8c]
push str._s_s
push ecx
mov ebx, eax
call edi
add esp, 0x10
lea edx, [esp + 0x84]
mov ecx, 0x6694d0
push edx
call fcn.0043cd10
push eax
push esi
mov dword [esp + 0x28], eax
call fcn.004018f0
add esp, 8
mov ecx, 0x6694d0
push 1
push ebx
call fcn.0043d1d0
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x10], ebx
call fcn.00401950
mov ebp, eax
push 0
push esi
mov dword [esp + edi + 0x68], ebp
call fcn.00401770
mov edx, dword [eax + 4]
mov ecx, dword [eax + 8]
push 0
push 0x3ff00000
push 0
push 0
push 0x186
push 0
push 0
push esi
add edx, ebx
push ecx
push edx
push ebp
call fcn.00401b10
call fcn.00401950
mov ebp, eax
push 1
push esi
mov dword [esp + edi + 0x8c], ebp
call fcn.00401770
mov edx, dword [eax + 4]
mov ecx, dword [eax + 8]
push 0
push 0x3ff00000
push 0
push 0
push 0x186
push 0
push 1
push esi
sub edx, ebx
push ecx
push edx
push ebp
call fcn.00401b10
mov eax, dword [esp + 0x78]
mov ecx, 0x87
cdq
idiv ecx
add esp, 0x68
mov dword [esp + 0x14], edx
call fcn.00401950
mov ebp, eax
push 2
push esi
mov dword [esp + edi + 0x38], ebp
call fcn.00401770
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push 0
push 0x3ff00000
push 0
push 0
push 0x186
push 0
push 2
push esi
add eax, ebx
push edx
push eax
push ebp
call fcn.00401b10
mov ecx, dword [esp + 0x48]
push ecx
push ebp
call fcn.00403070
call fcn.00401950
mov ebp, eax
push 3
push esi
mov dword [esp + edi + 0x84], ebp
call fcn.00401770
add esp, 0x44
push 0
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push 0x3ff00000
push 0
push 0
push 0x186
push 0
push 3
push esi
sub eax, ebx
push edx
push eax
push ebp
call fcn.00401b10
mov ecx, dword [esp + 0x40]
push ecx
push ebp
call fcn.00403070
mov eax, dword [esp + 0x44]
add esp, 0x34
add eax, 0x18
add edi, 4
add ebx, 0x168
cmp eax, 0x60
mov dword [esp + 0x10], eax
jl 0x406c5a
xor edi, edi
mov dword [esp + 0x10], edi
call fcn.00401950
mov ebp, dword [edi*4 + 0x492a58]
mov ebx, eax
push ebp
push esi
mov dword [esp + edi*4 + 0x78], ebx
call fcn.00401770
lea ecx, [edi + edi*4]
push 0
push 0x3ff00000
push 0
lea edx, [ecx + ecx*4]
mov ecx, dword [eax + 8]
shl edx, 2
push 0
push edx
mov edx, dword [eax + 4]
push 0
push ebp
push esi
push ecx
push edx
push ebx
call fcn.00401b10
add esp, 0x34
test edi, edi
jne 0x406de2
push edi
push ebx
call fcn.00402840
jmp 0x406df2
cmp edi, 1
jne 0x406df5
push 0x80
push ebx
call fcn.00402980
add esp, 8
inc edi
cmp edi, 5
jl 0x406d92
push 8
push 1
call fcn.00406930
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
xor edi, edi
xor ebp, ebp
inc eax
push ebp
push eax
mov ecx, 0x6694d0
mov dword [esp + 0x1c], ebp
call fcn.0043d1a0
call fcn.004454a0
test eax, eax
je 0x406ff3
call fcn.00406a70
inc edi
mov ecx, 0xb4
mov eax, edi
mov dword [esp + 0x24], edi
cdq
idiv ecx
test edx, edx
jne 0x406e98
xor edi, edi
mov edx, dword [esp + edi + 0x60]
push 0
push 0x2d0
push edx
call fcn.004026c0
mov eax, dword [esp + edi + 0x5c]
push 0
push 0xfffffd30
push eax
call fcn.004026c0
mov ecx, dword [esp + edi + 0x48]
push 0
push 0x2d0
push ecx
call fcn.004026c0
mov edx, dword [esp + edi + 0x64]
push 0
push 0xfffffd30
push edx
call fcn.004026c0
add edi, 4
add esp, 0x30
cmp edi, 0x10
jl 0x406e49
mov eax, dword [esp + 0x24]
mov ecx, 0x78
cdq
idiv ecx
test edx, edx
jne 0x406f08
mov eax, dword [esp + 0x10]
mov ebx, 1
cmp eax, 4
jne 0x406ec8
cmp ebp, ebx
jne 0x406ec8
push 8
push 3
call fcn.00406930
add esp, 8
jmp 0x406f10
call fcn.00401950
push 8
push esi
mov edi, eax
call fcn.00401770
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push 0
push 0x3ff00000
push 0
push 1
push 0x3e8
push 0
push 8
push esi
push edx
push eax
push edi
call fcn.00401b10
push 8
push 2
call fcn.00406930
add esp, 0x3c
jmp 0x406f10
test ebx, ebx
je 0x406fd7
mov eax, dword [0x5e98b8]
test eax, eax
jne 0x406fd7
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 1]
mov ecx, 5
cdq
idiv ecx
test edx, edx
mov dword [esp + 0x10], edx
jne 0x406f42
inc ebp
cmp ebp, 2
mov dword [esp + 0x14], ebp
je 0x407009
lea ecx, [edx + edx*4]
lea eax, [esp + 0x70]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 5
lea ebp, [ecx*4 + 0x492a58]
mov edi, dword [ebp]
push edi
push esi
call fcn.00401770
mov edx, dword [esp + 0x20]
mov ecx, dword [eax + 8]
push ecx
mov ebx, dword [edx]
mov edx, dword [eax + 4]
push edx
push ebx
call fcn.00402620
push edi
push esi
push ebx
call fcn.00402320
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add esp, 0x20
add ebp, 4
add ecx, 4
dec eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jne 0x406f5c
call fcn.00407d20
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0
lea edx, [ecx + eax*4]
mov ecx, dword [esp + 0x24]
add eax, edx
lea edx, [eax + ecx + 1]
mov ecx, 0x6694d0
push edx
call fcn.0043d1a0
push 8
push 1
call fcn.00406930
mov ebp, dword [esp + 0x1c]
add esp, 8
xor ebx, ebx
call fcn.00445410
call fcn.0040b710
push 1
call fcn.004234d0
add esp, 4
test eax, eax
jne 0x407009
mov edi, dword [esp + 0x24]
mov eax, dword [0x634b14]
test eax, eax
jne 0x407009
cmp dword [0x66c0e0], 1
jne 0x406e22
mov dword [0x634b14], 1
lea edi, [esp + 0x70]
mov ebx, 5
mov eax, dword [edi]
push eax
call fcn.00401a90
add esp, 4
add edi, 4
dec ebx
jne 0x40701c
xor edi, edi
mov ecx, dword [esp + edi + 0x60]
push ecx
call fcn.00401a90
mov edx, dword [esp + edi + 0x54]
push edx
call fcn.00401a90
mov eax, dword [esp + edi + 0x38]
push eax
call fcn.00401a90
mov ecx, dword [esp + edi + 0x4c]
push ecx
call fcn.00401a90
add edi, 4
add esp, 0x10
cmp edi, 0x10
jl 0x40702f
push esi
call fcn.004016e0
mov edx, dword [esp + 0x2c]
push edx
call fcn.00422680
mov eax, dword [esp + 0x34]
add esp, 8
mov ecx, 0x6694d0
push eax
call fcn.0043d560
push 0
call fcn.0040b920
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret