Function at 0x401000
Capabilities:
Check for time delay via gettickcount
Check os version
Create directory
Create process on windows
Delete directory
Delete file
Get common file path
Set current directory

Disassembly:
push ebp
mov eax, 0x4404
mov ebp, esp
call fcn.004037c0
push ebx
mov ecx, 0x68
push esi
push edi
mov esi, str.PigScript_Version_1.50_for_MIRC
lea edi, [ebp - 0x2fc]
rep movsd dword es:[edi], dword [esi]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push str.CTL3D32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, 0x20
mov esi, eax
jae 0x401043
xor esi, esi
jmp 0x40106d
push str.Ctl3dRegister
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401058
push dword [ebp + 8]
call eax
push str.Ctl3dAutoSubclass
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40106d
push dword [ebp + 8]
call eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x2fc]
lea edx, [ebp - 0x2cc]
push 0
push 0x40171a
mov dword [0x40d4c0], eax
push 0
mov dword [0x40d4c4], ecx
push 0x6a
mov dword [0x404388], edx
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 1
jne 0x401573
push 0x104
lea eax, [ebp - 0x404]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
movsx eax, byte [ebp - 0x2cd]
cmp eax, 0x53
je 0x4010e2
cmp eax, 0x54
je 0x4010f8
cmp eax, 0x55
je 0x401151
cmp eax, 0x57
je 0x40110e
cmp eax, 0x58
je 0x401124
jmp 0x4011e2
push 0x104
mov eax, dword [0x404388]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4011e2
mov eax, dword [0x404388]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x4011e2
push 0x104
mov eax, dword [0x404388]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x4011e2
lea eax, [ebp - 0x404]
push eax
push dword [0x404388]
call fcn.004036ed
add esp, 8
push 0x5c
push dword [0x404388]
call fcn.00403732
add esp, 8
mov byte [eax], 0
jmp 0x4011e2
mov eax, dword [0x404388]
mov ebx, 0xa
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x40401c
mov eax, dword [0x404388]
push eax
call fcn.00403711
add esp, 8
mov eax, dword [0x404388]
push 0
push eax
call fcn.00403732
add esp, 8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x64
sub edx, edx
div ecx
sub edx, edx
div ebx
add dl, 0x30
mov byte [edi], dl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc edi
sub edx, edx
div ebx
sub edx, edx
div ebx
add dl, 0x30
mov byte [edi], dl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc edi
sub edx, edx
div ebx
add dl, 0x30
push 0
mov byte [edi], dl
mov byte [edi + 1], 0
mov eax, dword [0x404388]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x401151
xor ebx, ebx
cmp byte [ebp - 0x2ce], bl
je 0x4012b2
push ebx
push 0x401625
push ebx
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 2
je 0x401573
mov edi, 0x4000
mov eax, dword [0x404388]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x4012b2
push edi
lea eax, [ebp - 0x4404]
push eax
push 4
push dword [0x40d4c0]
call dword [sym.imp.USER32.dll_LoadStringA]
push 4
lea edx, [ebp - 0x4404]
push dword [0x40d4c4]
push edx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
je 0x401292
mov eax, dword [0x404388]
push eax
call fcn.0040159e
add esp, 4
test eax, eax
jne 0x4012b2
push edi
lea eax, [ebp - 0x4404]
push eax
push 5
push dword [0x40d4c0]
call dword [sym.imp.USER32.dll_LoadStringA]
push ebx
lea edx, [ebp - 0x4404]
push dword [0x40d4c4]
push edx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
push 0x401625
push ebx
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 2
jne 0x401210
jmp 0x401573
mov eax, dword [0x404388]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [ebp - 0x15e], 0
je 0x4012cc
call fcn.004017ad
lea eax, [ebp - 0x4404]
lea edx, [ebp - 0x404]
movsx ecx, byte [ebp - 0x160]
push eax
push ecx
push edx
call fcn.00401bfd
add esp, 0xc
test eax, eax
jne 0x401573
cmp byte [ebp - 0x15e], 0
je 0x401300
call fcn.00401854
xor ebx, ebx
cmp byte [ebp - 0x1c7], bl
je 0x40155d
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov word [ebp - 0x24], bx
mov dword [ebp - 0x30], ebx
mov word [ebp - 0x22], bx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x10]
mov dword [ebp - 0x1c], ebx
push eax
lea ecx, [ebp - 0x54]
push ecx
mov dword [ebp - 0x18], ebx
push ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x54], 0x44
cmp byte [ebp - 0x15f], 1
sbb eax, eax
push ebx
inc eax
lea ecx, [ebp - 0x1c6]
push eax
push ebx
push ebx
push ebx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp byte [ebp - 0x15f], bl
je 0x401511
test eax, eax
je 0x401445
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x80000000
push 0xffffffffffffffff
lea eax, [ebp - 0xb7]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
test eax, eax
je 0x4014b1
mov eax, dword [ebp - 0xb7]
cmp eax, 2
je 0x401410
cmp eax, 3
je 0x4013ce
cmp eax, 5
je 0x40140d
cmp eax, 6
je 0x401410
jmp 0x401424
and edi, 0x7fffffff
inc edi
cmp dword [ebp - 0xab], ebx
je 0x4013e9
push dword [ebp - 0xab]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xa7], ebx
je 0x4013fd
push dword [ebp - 0xa7]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xa3], ebx
je 0x401424
push dword [ebp - 0xa3]
jmp 0x40141e
dec edi
jmp 0x401424
cmp dword [ebp - 0xab], ebx
je 0x401424
push dword [ebp - 0xab]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10002
push dword [ebp - 0xaf]
push dword [ebp - 0xb3]
call dword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
test edi, edi
jne 0x40139b
jmp 0x4014b1
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x54]
push eax
push ecx
xor eax, eax
lea edx, [ebp - 0x1c6]
push eax
push eax
push eax
push eax
push eax
push eax
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xc0000000
cmp eax, 0x80000000
jne 0x401494
mov dword [ebp - 0x5b], 0x103
lea eax, [ebp - 0x5b]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 0x5b], 0x103
je 0x40147c
jmp 0x40149f
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x4404], 0
je 0x401511
lea edi, [ebp - 0x4404]
push edi
call fcn.0040374f
add esp, 4
add edi, eax
inc edi
cmp byte [edi], 0
jne 0x4014c0
dec edi
lea eax, [ebp - 0x4404]
cmp edi, eax
jbe 0x401511
dec edi
cmp byte [edi], 0
jne 0x4014dc
inc edi
movsx eax, byte [edi]
cmp eax, 0x30
je 0x4014f2
cmp eax, 0x31
je 0x4014fc
jmp 0x401504
inc edi
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x401504
inc edi
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
sub edi, 2
lea eax, [ebp - 0x4404]
cmp edi, eax
ja 0x4014dc
cmp byte [ebp - 0x2cd], 0x55
jne 0x40155d
lea eax, [ebp - 0x404]
lea ecx, [ebp - 0x15c]
push eax
push ecx
call fcn.004036ed
add esp, 8
lea ecx, [ebp - 0x15c]
push 0x5c
push ecx
call fcn.00403732
add esp, 8
lea ecx, [ebp - 0x15c]
mov byte [eax], 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [0x404388]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp byte [ebp - 0x161], 0
je 0x401573
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test esi, esi
je 0x40158c
push str.Ctl3dUnregister
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40158c
push dword [ebp + 8]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10