Function at 0x4021af
Capabilities:
Accept command line arguments
Create process on windows
Link many functions at runtime
Shutdown system
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c0
push ebx
push esi
push edi
push 1
pop esi
push 4
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
mov dword [ebp - 8], edi
mov al, byte [edi]
cmp al, 0x22
jne 0x40226e
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 8], edi
xor ebx, ebx
cmp al, bl
je 0x4021f8
cmp al, 0x22
je 0x4021f8
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 8], edi
jmp 0x4021e7
cmp byte [edi], 0x22
jne 0x402201
inc edi
mov dword [ebp - 8], edi
cmp byte [edi], 0x20
jne 0x40220f
inc edi
cmp byte [edi], 0x20
je 0x402206
mov dword [ebp - 8], edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [edi], 0x2f
mov dword [ebp - 0x10], eax
jne 0x402246
mov al, byte [edi + 1]
cmp al, 0x53
je 0x402229
cmp al, 0x73
jne 0x40222f
mov dword [0x4052f8], esi
mov al, byte [edi + 1]
cmp al, 0x4d
je 0x40223a
cmp al, 0x6d
jne 0x402246
cmp byte [edi + 2], 0x34
jne 0x402246
mov dword [0x40538c], esi
lea eax, [ebp - 0x340]
push 0x100
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov cl, byte [edi]
mov eax, edi
cmp cl, bl
je 0x402281
cmp cl, 0x7f
je 0x402281
mov cl, byte [eax + 1]
inc eax
jmp 0x40225f
xor ebx, ebx
cmp al, bl
je 0x402201
cmp al, 0x20
je 0x402201
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 8], edi
jmp 0x402270
cmp byte [eax], bl
je 0x4022b7
mov byte [eax], bl
inc eax
xor edx, edx
mov cl, byte [eax]
cmp cl, bl
je 0x4022a2
cmp cl, 0x20
je 0x4022a2
movsx ecx, cl
lea edx, [edx + edx*4]
inc eax
lea edx, [ecx + edx*2 - 0x30]
jmp 0x40228a
add dword [0x405178], edx
inc eax
push eax
lea eax, [ebp - 0x340]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x340]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, ebx
mov dword [0x4052e0], eax
jge 0x4022d9
lea eax, [ebp - 0x340]
jmp 0x40256c
call section..text
mov eax, dword [0x405178]
mov edi, dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push eax
push dword [0x4052e0]
lea ecx, [ebp - 0x340]
mov dword [0x4052c4], ebx
mov dword [0x4052d4], eax
mov dword [0x4052cc], eax
mov dword [0x405374], ecx
call edi
lea eax, [ebp - 1]
push esi
mov esi, dword [sym.imp.KERNEL32.dll__lread]
push eax
push dword [0x4052e0]
call esi
cmp byte [ebp - 1], bl
je 0x402380
movzx eax, byte [ebp - 1]
push eax
lea eax, [ebp - 0x12c]
push eax
push dword [0x4052e0]
call esi
lea eax, [ebp - 0x14]
push 4
push eax
push dword [0x4052e0]
call esi
lea eax, [ebp - 0x12c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jl 0x40237a
push 2
push ebx
push eax
call edi
cmp dword [ebp - 0x14], eax
je 0x40236f
mov byte [ebp - 0x12c], bl
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x402380
mov byte [ebp - 0x12c], bl
push 4
push 0x405300
push dword [0x4052e0]
call esi
push 0xc
push 0x4053a0
push dword [0x4052e0]
call esi
push 8
push 0x405354
push dword [0x4052e0]
call esi
push 0x40
push 0x405314
push dword [0x4052e0]
call esi
push 3
push 0x405398
push dword [0x4052e0]
call esi
test byte [0x405303], 0x40
je 0x4023de
mov dword [0x40538c], 1
lea eax, [ebp - 0x4c0]
mov dword [0x405394], eax
movzx eax, byte [0x40539a]
push eax
lea eax, [ebp - 0x4c0]
push eax
push dword [0x4052e0]
call esi
mov eax, dword [0x405350]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
inc eax
mov dword [0x405378], 0x401edf
push eax
push 2
mov dword [0x40537c], 0x4020a0
mov dword [0x405390], 0x402f64
call esi
push eax
mov dword [0x405368], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
mov dword [0x40536c], eax
push dword [0x40534c]
mov dword [0x405370], eax
push ebx
push dword [0x4052e0]
call fcn.00401edf
test byte [0x405301], 0x10
mov dword [0x405370], ebx
je 0x40246e
mov byte [0x405304], 1
push dword [ebp - 0x10]
call fcn.0040274c
test eax, eax
pop ecx
je 0x402573
push dword [ebp - 0x10]
call fcn.004027ab
test eax, eax
pop ecx
je 0x402573
mov eax, dword [0x4052a0]
cmp dword [0x405348], ebx
mov dword [0x4052c0], eax
mov eax, dword [ebp - 0x10]
mov dword [0x4052c8], eax
mov dword [0x40535c], 0x4053a0
je 0x4024ee
push 1
push ebx
push dword [0x4052e0]
call edi
push 2
push ebx
push dword [0x4052e0]
mov dword [ebp - 0xc], eax
call edi
push ebx
mov dword [ebp - 0x14], eax
push dword [ebp - 0xc]
push dword [0x4052e0]
call edi
mov eax, dword [ebp - 0x14]
cmp eax, dword [0x405348]
je 0x4024ee
push str._CRC_
jmp 0x40256d
mov eax, dword [0x405314]
inc eax
push eax
push 2
call esi
push eax
mov dword [0x405360], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
mov dword [0x405364], eax
push dword [0x405318]
mov dword [0x405370], eax
push ebx
push dword [0x4052e0]
call fcn.00401edf
cmp byte [ebp - 1], bl
mov dword [0x405370], ebx
jne 0x402590
lea eax, [ebp - 0x12c]
push eax
call fcn.00402e72
pop ecx
lea eax, [ebp - 0x12c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov esi, dword [sym.imp.KERNEL32.dll__lclose]
push eax
call esi
lea eax, [ebp - 0x12c]
push 2
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, ebx
jge 0x40257a
lea eax, [ebp - 0x12c]
push eax
call fcn.00402ecd
pop ecx
xor eax, eax
jmp 0x402747
push ebx
push dword [0x40531c]
push edi
push dword [0x4052e0]
call fcn.00401edf
push edi
call esi
cmp byte [0x4052e8], bl
push 1
pop edi
mov byte [ebp - 0x1ac], bl
mov dword [ebp - 0x1c], edi
je 0x4025b4
push str._CRC_
call fcn.00402ecd
pop ecx
jmp 0x402678
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x40261e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WiseMain
push esi
call edi
push str.UpdateScreen
push esi
mov dword [0x4053ac], eax
call edi
push str.DisplayGraphics
push esi
mov dword [0x405388], eax
call edi
push str.DiskPrompt
push esi
mov dword [0x405384], eax
call edi
push str.FileWrite
push esi
mov dword [0x4052a4], eax
call edi
push str.HandleFtp
push esi
mov dword [0x405390], eax
call edi
push 1
mov dword [0x40539c], eax
pop edi
mov eax, dword [0x4053ac]
cmp eax, ebx
jne 0x40264f
cmp byte [ebp - 1], bl
je 0x402645
push ebx
push str.Install
push str.Demo_installations_only_run_on_the_computer_they_were_created_on.
push dword [0x4052a0]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x402678
push str.System_DLLs_corrupt_or_missing.
jmp 0x4025a9
lea ecx, [ebp - 0x3c0]
push ecx
lea ecx, [ebp - 0x1ac]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp - 8]
push 0x4052c0
call eax
movzx eax, ax
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.00401083
cmp byte [ebp - 1], bl
jne 0x40269b
lea eax, [ebp - 0x234]
push 0x200
push eax
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov eax, dword [0x40530c]
cmp eax, ebx
je 0x4026ab
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0x1c], edi
je 0x402724
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0xc]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402709
lea eax, [ebp - 0x28]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push ebx
push ebx
lea eax, [ebp - 0x2c]
push ebx
push eax
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x20], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 2
pop eax
cmp dword [ebp - 0x230], eax
jne 0x40271c
cmp dword [ebp - 0x1c], 0x42
jne 0x40271c
xor eax, eax
push ebx
push eax
call dword [sym.imp.USER32.dll_ExitWindowsEx]
cmp byte [ebp - 0x1ac], bl
je 0x40273b
lea eax, [ebp - 0x1ac]
push 5
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
leave
ret