Function at 0x406840
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4722d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x108c
call fcn.00450a20
push ebx
push esi
push edi
xor edi, edi
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], edi
mov byte [esp + 0xf], 1
mov byte [esp + 0x18], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x24], 0
call fcn.00401b00
push edi
mov dword [esp + 0x10a8], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00470c1d
test eax, eax
jne 0x4068db
push str.Fatal_Error:_MFC_initialization_failed
mov ecx, 0x4a3e98
call fcn.00403a10
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403b80
mov ecx, esi
call fcn.00403080
mov dword [esp + 0x28], 1
jmp 0x406c89
mov ebx, dword [ebp + 8]
cmp ebx, 3
jle 0x4068e8
call fcn.00402220
mov esi, 1
cmp ebx, esi
jle 0x406a6a
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + esi*4]
push eax
lea ecx, [esp + 0x14]
call fcn.004067a0
mov ecx, dword [esp + 0x10]
push 0x477f44
push ecx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a3b
mov edx, dword [esp + 0x10]
push 0x477f3c
push edx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a3b
mov eax, dword [esp + 0x10]
push str._win
push eax
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a34
mov ecx, dword [esp + 0x10]
push 0x477f24
push ecx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a34
mov edx, dword [esp + 0x10]
push str._dos
push edx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a19
mov eax, dword [esp + 0x10]
push 0x477f0c
push eax
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a19
mov ecx, dword [esp + 0x10]
push str._wait
push ecx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a09
mov edx, dword [esp + 0x10]
push 0x477ef4
push edx
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x406a09
mov eax, dword [esp + 0x10]
push 0x477eec
push eax
call fcn.0044fcc9
add esp, 8
test eax, eax
je 0x4069f9
mov ecx, dword [esp + 0x10]
push 0x477ee4
push ecx
call fcn.0044fcc9
add esp, 8
test eax, eax
jne 0x406c4a
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 1
call fcn.00403060
jmp 0x406a5e
lea ecx, [esp + 0x10]
mov byte [esp + 0xf], 0
call fcn.00403060
jmp 0x406a5e
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x20], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406a54
mov byte [esp + 0x18], 0
jmp 0x406a40
mov byte [esp + 0x18], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [ebp + 8]
inc esi
cmp esi, eax
jl 0x4068f8
push str.SystemRoot
call fcn.004506b5
add esp, 4
push eax
lea ecx, [esp + 0x18]
call fcn.00404300
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 4]
mov esi, dword [edx - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [edx - 8]
sub eax, esi
or eax, ecx
mov byte [esp + 0x10a4], 1
jge 0x406ab1
push esi
lea ecx, [esp + 0x18]
call fcn.00402ae0
mov edx, dword [esp + 0x14]
push edx
call fcn.0044fdd4
add esp, 4
cmp esi, edi
jl 0x406cb6
mov eax, dword [esp + 0x14]
cmp esi, dword [eax - 8]
jg 0x406cb6
mov dword [eax - 0xc], esi
mov eax, dword [esp + 0x14]
mov word [eax + esi*2], di
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], edi
mov byte [esp + 0x1c], 0
jl 0x406b2e
push str.MININT
push ecx
call fcn.0044fd76
mov ecx, dword [esp + 0x1c]
add esp, 8
cmp eax, edi
je 0x406b07
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
jne 0x406b29
cmp dword [ecx - 0xc], edi
jl 0x406b2e
push str.I386
push ecx
call fcn.0044fd76
add esp, 8
cmp eax, edi
je 0x406b2e
sub eax, dword [esp + 0x14]
sar eax, 1
cmp eax, 0xffffffff
je 0x406b2e
mov byte [esp + 0x1c], 1
mov al, byte [esp + 0xf]
test al, al
je 0x406c1c
push 0x1f4
push 2
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x50], esp
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push str..PipeMyTestChannel
mov word [esi + 4], di
call fcn.0044ff91
add esp, 4
push eax
push str..PipeMyTestChannel
mov ecx, esi
call fcn.004049b0
lea ecx, [esp + 0x54]
call fcn.00401c30
cmp eax, edi
setne bl
movzx ecx, bl
push ecx
push str.bDVEnabled_d_n
call fcn.004509ad
add esp, 8
test bl, bl
je 0x406c1c
xor eax, eax
mov ecx, 0x400
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov al, byte [esp + 0x18]
xor edx, edx
test al, al
setne dl
xor eax, eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb8], eax
push 0x1000
lea eax, [esp + 0x9c]
add edx, 0x67
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0xb0], 0xd
mov dword [esp + 0xb4], edx
call fcn.004010e0
test eax, eax
setne al
test al, al
jne 0x406c1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x477e20
call fcn.004509ad
add esp, 8
lea ecx, [esp + 0x30]
call fcn.004010c0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
call fcn.004062e0
mov al, byte [esp + 0x1b]
add esp, 0xc
test al, al
je 0x406c63
mov al, byte [esp + 0x1c]
test al, al
je 0x406c56
call fcn.00404d40
jmp 0x406c63
call fcn.00402220
push 1
call fcn.00450be4
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00402190
add esp, 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x10a4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406c89
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x30]
mov dword [esp + 0x10a4], 0xffffffff
call fcn.004016d0
mov ecx, dword [esp + 0x109c]
mov eax, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401d50
int3