Function at 0x401080
Capabilities:
Check if file exists
Check os version
Terminate process

Disassembly:
sub esp, 0x34
push esi
push edi
call section..text
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x401612
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push ebp
push str.0C21844
push edi
push 0xf001f
call ebx
mov ebp, eax
mov dword [esp + 0x24], ebp
cmp ebp, edi
jne 0x4010d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x401610
mov esi, 0xc0000034
jmp 0x401610
push 0x204
push edi
push 2
lea eax, [esp + 0x20]
push eax
push edi
push edi
push edi
push 0x403038
push 0xffffffffffffffff
push ebp
mov dword [0x403038], edi
mov dword [esp + 0x3c], edi
call dword [0x403088]
mov esi, eax
cmp esi, edi
jne 0x4015ef
mov ecx, dword [0x403038]
push str.1C21844
push edi
push 0xf001f
mov dword [ecx], 0x60010000
call ebx
mov ebx, eax
mov dword [esp + 0x20], ebx
cmp ebx, edi
jne 0x401140
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4015ef
mov esi, 0xc0000034
jmp 0x4015ef
push 0x204
push edi
push 2
lea edx, [esp + 0x20]
push edx
push edi
push edi
push edi
push 0x403040
push 0xffffffffffffffff
push ebx
mov dword [0x403040], edi
mov dword [esp + 0x3c], edi
call dword [0x403088]
mov esi, eax
cmp esi, edi
jne 0x4015d6
mov eax, dword [0x403038]
mov ecx, dword [eax + 0x30]
add dword [0x403040], ecx
mov ecx, dword [eax + 0x28]
sub ecx, dword [eax + 0x30]
mov dword [esp + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov edx, eax
movzx eax, al
shr edx, 8
and edx, 0xff
shl eax, 8
push 0x20
or edx, eax
push 0xffffffffffffffff
mov dword [0x403080], edx
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0xffffffffffffffff
push 0xfffffffffffffffe
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0xc
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov ebp, dword [0x403038]
mov esi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0xc]
push edi
push esi
push edi
push ecx
call fcn.00401700
push edi
push 0x989680
push edx
push eax
call fcn.00401650
mov ebx, eax
test bl, 1
je 0x4011f0
inc ebx
mov eax, ebx
mov edx, 0x1312d00
mul edx
push edi
push esi
push edx
push eax
call fcn.00401650
mov ecx, eax
and ecx, 1
xor edi, edi
or ecx, edi
mov cl, 1
je 0x40121b
call fcn.00401620
add eax, 1
adc edx, edi
jmp 0x401220
call fcn.00401620
mov dword [esp + 0x28], eax
mov eax, 1
mov word [0x403020], ax
mov esi, dword [ebp + 0x20]
mov dword [0x403024], esi
mov ax, word [ebp + 0x24]
mov ecx, 2
mov word [0x403022], cx
movzx ecx, ax
mov word [0x40302e], ax
add ecx, ecx
mov eax, ecx
imul ecx, esi
mov dword [esp + 0x2c], edx
xor edx, edx
mov word [0x403030], dx
cdq
and edx, 7
add eax, edx
sar eax, 3
shr ecx, 3
mov word [0x40302c], ax
mov dword [0x403028], ecx
test dword [ebp + 0x24], 0x80000000
je 0x401291
mov eax, 3
mov word [0x403020], ax
push 8
push edi
push edi
push 0x403020
push edi
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.WINMM.dll_waveOutOpen]
mov esi, eax
cmp esi, edi
je 0x4012bf
cmp esi, 0x20
jne 0x4015c6
mov esi, 0x88780064
jmp 0x4015c6
movzx ebp, word [0x40302c]
mov eax, dword [esp + 0x10]
imul ebp, ebx
mov edx, dword [0x403040]
mov ebx, dword [esp + 0x18]
push 0x20
push 0x403060
push eax
mov dword [0x403060], edx
mov dword [0x403064], ebx
mov dword [0x403070], 0xc
mov dword [0x403074], 1
mov dword [0x403068], edi
mov dword [0x40306c], edi
mov dword [0x40307c], edi
mov dword [0x403078], edi
mov dword [0x403034], 0x403060
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
mov esi, eax
cmp esi, edi
jne 0x4015ac
mov ecx, dword [0x403038]
mov dword [ecx], 0x60010001
mov edx, dword [0x403034]
mov eax, dword [esp + 0x10]
push 0x20
push edx
push eax
mov dword [section..data], edi
mov dword [0x403004], edi
mov dword [0x403084], 0x403000
call dword [sym.imp.WINMM.dll_waveOutWrite]
mov esi, eax
cmp esi, edi
jne 0x4015ac
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
neg eax
adc ecx, edi
neg ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], ecx
push 0xc
lea ecx, [esp + 0x3c]
push ecx
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], 2
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
call dword [sym.imp.WINMM.dll_waveOutGetPosition]
mov esi, eax
cmp dword [esp + 0x3c], edi
jne 0x4013e6
lea esp, [esp]
lea eax, [esp + 0x30]
push eax
push edi
call dword [0x40303c]
mov edx, dword [esp + 0x10]
push 0xc
lea ecx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.WINMM.dll_waveOutGetPosition]
mov esi, eax
cmp dword [esp + 0x3c], edi
je 0x4013c0
mov eax, dword [0x403084]
push eax
call dword [0x40308c]
mov ecx, dword [esp + 0x3c]
push 0xffffffffffffffff
push 0xffffd8f0
push edi
push ecx
call fcn.00401700
mov edi, dword [0x403038]
mov ecx, dword [edi + 0x20]
push 0
push ecx
push edx
push eax
call fcn.00401650
add dword [section..data], eax
mov eax, ebx
mov dword [esp + 0x38], 4
adc dword [0x403004], edx
xor edx, edx
div ebp
mov dword [esp + 0x3c], 0
mov ebp, eax
jmp 0x401440
test ebp, ebp
je 0x4014bc
mov edx, dword [0x403084]
push edx
push 0
call dword [0x40303c]
test byte [0x403070], 0x10
je 0x401472
mov eax, dword [esp + 0x28]
add dword [section..data], eax
mov ecx, dword [esp + 0x2c]
adc dword [0x403004], ecx
jmp 0x4014ab
mov eax, dword [esp + 0x10]
push 0xc
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.WINMM.dll_waveOutGetPosition]
mov esi, eax
cmp esi, 6
je 0x40158d
test esi, esi
jne 0x4015aa
mov ecx, dword [esp + 0x28]
add dword [section..data], ecx
mov edx, dword [esp + 0x2c]
adc dword [0x403004], edx
mov edi, dword [0x403038]
dec ebp
cmp dword [edi + 8], 0
jne 0x40150e
test ebp, ebp
jne 0x401444
cmp dword [edi + 8], 0
jne 0x40150e
mov eax, dword [0x403084]
push eax
push 0
call dword [0x40303c]
test byte [0x403070], 1
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
jne 0x401506
lea esp, [esp]
lea eax, [esp + 0x30]
push eax
push 0
call dword [0x40303c]
test byte [0x403070], 1
je 0x4014f0
mov edi, dword [0x403038]
xor esi, esi
mov ebx, 2
xor eax, eax
cmp dword [edi + 8], ebx
jne 0x401560
mov ecx, dword [0x403084]
push ecx
push eax
call dword [0x40303c]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WINMM.dll_waveOutPause]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x30]
push edx
push 0
call dword [0x40303c]
mov edi, dword [0x403038]
cmp dword [edi + 8], ebx
je 0x401543
mov eax, 1
cmp dword [edi + 8], 0
jne 0x401594
cmp eax, 1
jne 0x401594
mov eax, dword [0x403084]
push eax
call dword [0x40308c]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.WINMM.dll_waveOutRestart]
mov edi, dword [0x403038]
jmp 0x401440
mov esi, 0x88890004
jmp 0x4015aa
cmp dword [edi + 8], 1
jne 0x4015aa
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WINMM.dll_waveOutReset]
mov esi, 0x60010002
xor edi, edi
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x4015c6
push eax
call dword [sym.imp.WINMM.dll_waveOutReset]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.WINMM.dll_waveOutClose]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
xor edi, edi
mov eax, dword [0x403040]
cmp eax, edi
je 0x4015e8
push eax
push 0xffffffffffffffff
call dword [0x403048]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x403038]
cmp eax, edi
je 0x401609
mov dword [eax], esi
mov ecx, dword [0x403038]
push ecx
push 0xffffffffffffffff
call dword [0x403048]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]