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 0x4022aa
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 0x402282
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
mov al, byte [edi + 1]
cmp al, 0x58
je 0x402251
cmp al, 0x78
jne 0x402263
cmp byte [edi + 2], 0x3d
jne 0x402263
mov dword [0x40541c], esi
mov dword [0x4053ec], esi
mov al, byte [edi + 1]
cmp al, 0x4d
je 0x40226e
cmp al, 0x6d
jne 0x402282
cmp byte [edi + 2], 0x35
jne 0x402282
cmp byte [edi + 3], 0x3d
jne 0x402282
lea eax, [edi + 4]
mov dword [0x4053f4], eax
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 0x4022c5
cmp cl, 0x7f
je 0x4022c5
mov cl, byte [eax + 1]
inc eax
jmp 0x40229b
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 0x4022ac
cmp byte [eax], bl
je 0x4022fb
mov byte [eax], bl
inc eax
xor edx, edx
mov cl, byte [eax]
cmp cl, bl
je 0x4022e6
cmp cl, 0x20
je 0x4022e6
movsx ecx, cl
lea edx, [edx + edx*4]
inc eax
lea edx, [ecx + edx*2 - 0x30]
jmp 0x4022ce
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 0x40231d
lea eax, [ebp - 0x3ac]
jmp 0x4025e2
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 0x4023c4
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 0x4023be
push 2
push ebx
push eax
call edi
cmp dword [ebp - 0x1c], eax
je 0x4023b3
mov byte [ebp - 0x12c], bl
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x4023c4
mov byte [ebp - 0x12c], bl
push 4
push 0x405360
push dword [0x405340]
call esi
push 0xc
push 0x405410
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 0x4053fc
push dword [0x405340]
call esi
test byte [0x405363], 0x40
je 0x402422
mov dword [0x4053ec], 1
lea eax, [ebp - 0x52c]
mov dword [0x4053f8], eax
movzx eax, byte [0x4053fe]
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]
cmp eax, ebx
mov dword [0x4053d8], 0x401edf
mov dword [0x4053dc], 0x4020a0
mov dword [0x4053f0], 0x403082
jle 0x4024a8
inc eax
push eax
push 2
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
mov dword [0x4053d0], ebx
jmp 0x4024b2
mov dword [0x4053ec], 1
test byte [0x405361], 0x10
je 0x4024c2
mov byte [0x405364], 1
push dword [ebp - 8]
call fcn.004027db
test eax, eax
pop ecx
je 0x4025e9
push dword [ebp - 8]
call fcn.0040283a
test eax, eax
pop ecx
je 0x4025e9
mov eax, dword [0x405300]
cmp dword [0x4053a8], ebx
mov dword [0x405320], eax
mov eax, dword [ebp - 8]
mov dword [0x405328], eax
mov dword [0x4053bc], 0x405410
je 0x402564
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 0x402564
push dword [ebp - 8]
push eax
lea eax, [ebp - 0x2ac]
push 0x405298
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x2ac]
push eax
call fcn.00402feb
add esp, 0x14
jmp 0x4025e9
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 0x402606
lea eax, [ebp - 0x12c]
push eax
call fcn.00402f36
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 0x4025f0
lea eax, [ebp - 0x12c]
push eax
call fcn.00402feb
pop ecx
xor eax, eax
jmp 0x4027d6
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 0x402647
lea eax, [ebp - 0x2ac]
push 0x40525c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x2ac]
push eax
call fcn.00402feb
add esp, 0x10
jmp 0x402707
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x4026aa
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x405250
push esi
call edi
push 0x405240
push esi
mov dword [0x405420], eax
call edi
push 0x405230
push esi
mov dword [0x4053e8], eax
call edi
push 0x405224
push esi
mov dword [0x4053e4], eax
call edi
push 0x405218
push esi
mov dword [0x405304], eax
call edi
push 0x40520c
push esi
mov dword [0x4053f0], eax
call edi
push 1
mov dword [0x405400], eax
pop edi
mov eax, dword [0x405420]
cmp eax, ebx
jne 0x4026de
cmp byte [ebp - 1], bl
je 0x4026d1
push ebx
push 0x405204
push 0x4051c0
push dword [0x405300]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x402707
push 0x4051a0
call fcn.00402feb
pop ecx
jmp 0x402707
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 0x40272a
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 0x40273a
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0x14], edi
je 0x4027b3
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 0x402798
lea eax, [ebp - 0x28]
push eax
push 0x40518c
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 0x4027ab
cmp dword [ebp - 0x14], 0x42
jne 0x4027ab
xor eax, eax
push ebx
push eax
call dword [sym.imp.USER32.dll_ExitWindowsEx]
cmp byte [ebp - 0x1ac], bl
je 0x4027ca
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