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, 0x52c
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 - 0xc], edi
mov al, byte [edi]
cmp al, 0x22
jne 0x40226e
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 0xc], edi
xor ebx, ebx
cmp al, bl
je 0x4021f8
cmp al, 0x22
je 0x4021f8
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 0xc], edi
jmp 0x4021e7
cmp byte [edi], 0x22
jne 0x402201
inc edi
mov dword [ebp - 0xc], edi
cmp byte [edi], 0x20
jne 0x40220f
inc edi
cmp byte [edi], 0x20
je 0x402206
mov dword [ebp - 0xc], edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [edi], 0x2f
mov dword [ebp - 8], eax
jne 0x402246
mov al, byte [edi + 1]
cmp al, 0x53
je 0x402229
cmp al, 0x73
jne 0x40222f
mov dword [0x405358], 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 [0x4053ec], esi
lea eax, [ebp - 0x3ac]
push 0x100
push eax
push dword [ebp - 8]
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 - 0xc], 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 - 0x3ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x3ac]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, ebx
mov dword [0x405340], eax
jge 0x4022d9
lea eax, [ebp - 0x3ac]
jmp 0x40258e
call section..text
mov eax, dword [0x405178]
mov edi, dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push eax
push dword [0x405340]
lea ecx, [ebp - 0x3ac]
mov dword [0x405324], ebx
mov dword [0x405334], eax
mov dword [0x40532c], eax
mov dword [0x4053d4], ecx
call edi
lea eax, [ebp - 1]
push esi
mov esi, dword [sym.imp.KERNEL32.dll__lread]
push eax
push dword [0x405340]
call esi
cmp byte [ebp - 1], bl
je 0x402380
movzx eax, byte [ebp - 1]
push eax
lea eax, [ebp - 0x12c]
push eax
push dword [0x405340]
call esi
lea eax, [ebp - 0x1c]
push 4
push eax
push dword [0x405340]
call esi
lea eax, [ebp - 0x12c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jl 0x40237a
push 2
push ebx
push eax
call edi
cmp dword [ebp - 0x1c], eax
je 0x40236f
mov byte [ebp - 0x12c], bl
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x402380
mov byte [ebp - 0x12c], bl
push 4
push 0x405360
push dword [0x405340]
call esi
push 0xc
push 0x405400
push dword [0x405340]
call esi
push 8
push 0x4053b4
push dword [0x405340]
call esi
push 0x40
push 0x405374
push dword [0x405340]
call esi
push 3
push 0x4053f8
push dword [0x405340]
call esi
test byte [0x405363], 0x40
je 0x4023de
mov dword [0x4053ec], 1
lea eax, [ebp - 0x52c]
mov dword [0x4053f4], eax
movzx eax, byte [0x4053fa]
push eax
lea eax, [ebp - 0x52c]
push eax
push dword [0x405340]
call esi
mov eax, dword [0x4053b0]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
inc eax
mov dword [0x4053d8], 0x401edf
push eax
push 2
mov dword [0x4053dc], 0x4020a0
mov dword [0x4053f0], 0x402f9f
call esi
push eax
mov dword [0x4053c8], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
mov dword [0x4053cc], eax
push dword [0x4053ac]
mov dword [0x4053d0], eax
push ebx
push dword [0x405340]
call fcn.00401edf
test byte [0x405361], 0x10
mov dword [0x4053d0], ebx
je 0x40246e
mov byte [0x405364], 1
push dword [ebp - 8]
call fcn.00402787
test eax, eax
pop ecx
je 0x402595
push dword [ebp - 8]
call fcn.004027e6
test eax, eax
pop ecx
je 0x402595
mov eax, dword [0x405300]
cmp dword [0x4053a8], ebx
mov dword [0x405320], eax
mov eax, dword [ebp - 8]
mov dword [0x405328], eax
mov dword [0x4053bc], 0x405400
je 0x402510
push 1
push ebx
push dword [0x405340]
call edi
push 2
push ebx
push dword [0x405340]
mov dword [ebp - 0x10], eax
call edi
push ebx
mov dword [ebp - 8], eax
push dword [ebp - 0x10]
push dword [0x405340]
call edi
mov eax, dword [0x4053a8]
cmp dword [ebp - 8], eax
je 0x402510
push dword [ebp - 8]
push eax
lea eax, [ebp - 0x2ac]
push str.File_size_expected_ld__size_returned_ld.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x2ac]
push eax
call fcn.00402f08
add esp, 0x14
jmp 0x402595
mov eax, dword [0x405374]
inc eax
push eax
push 2
call esi
push eax
mov dword [0x4053c0], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
mov dword [0x4053c4], eax
push dword [0x405378]
mov dword [0x4053d0], eax
push ebx
push dword [0x405340]
call fcn.00401edf
cmp byte [ebp - 1], bl
mov dword [0x4053d0], ebx
jne 0x4025b2
lea eax, [ebp - 0x12c]
push eax
call fcn.00402ead
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 0x40259c
lea eax, [ebp - 0x12c]
push eax
call fcn.00402f08
pop ecx
xor eax, eax
jmp 0x402782
push ebx
push dword [0x40537c]
push edi
push dword [0x405340]
call fcn.00401edf
push edi
call esi
cmp byte [0x405348], bl
push 1
pop edi
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x14], edi
mov byte [ebp - 0x1ac], bl
push eax
je 0x4025f3
lea eax, [ebp - 0x2ac]
push str.Could_not_extract_Wise0132.dll_to__s__CRC_does_not_match.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x2ac]
push eax
call fcn.00402f08
add esp, 0x10
jmp 0x4026b3
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x402656
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WiseMain
push esi
call edi
push str.UpdateScreen
push esi
mov dword [0x40540c], eax
call edi
push str.DisplayGraphics
push esi
mov dword [0x4053e8], eax
call edi
push str.DiskPrompt
push esi
mov dword [0x4053e4], eax
call edi
push str.FileWrite
push esi
mov dword [0x405304], eax
call edi
push str.HandleFtp
push esi
mov dword [0x4053f0], eax
call edi
push 1
mov dword [0x4053fc], eax
pop edi
mov eax, dword [0x40540c]
cmp eax, ebx
jne 0x40268a
cmp byte [ebp - 1], bl
je 0x40267d
push ebx
push str.Install
push str.Demo_installations_only_run_on_the_computer_they_were_created_on.
push dword [0x405300]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4026b3
push str.System_DLLs_corrupt_or_missing.
call fcn.00402f08
pop ecx
jmp 0x4026b3
lea ecx, [ebp - 0x42c]
push ecx
lea ecx, [ebp - 0x1ac]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0xc]
push 0x405320
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 0x4026d6
lea eax, [ebp - 0x234]
push 0x200
push eax
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov eax, dword [0x40536c]
cmp eax, ebx
je 0x4026e6
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0x14], edi
je 0x40275f
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x10]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402744
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 - 0x10]
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 0x402757
cmp dword [ebp - 0x14], 0x42
jne 0x402757
xor eax, eax
push ebx
push eax
call dword [sym.imp.USER32.dll_ExitWindowsEx]
cmp byte [ebp - 0x1ac], bl
je 0x402776
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