Function at 0x4206d0
Capabilities:
Accept command line arguments
Check os version
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
push ebx
push esi
push edi
push 0x40
lea eax, [ebp - 0xa0]
push 0
push eax
mov dword [ebp - 0xa4], 0x44
call fcn.004b03e0
add esp, 0xc
lea ecx, [ebp - 0xa4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push 0x118
lea edx, [ebp - 0x2bc]
push 0
push edx
mov dword [ebp - 0x2c0], 0x11c
call fcn.004b03e0
add esp, 0xc
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
push 0x800
call fcn.004412a0
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
test edi, edi
je 0x420795
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, 0x400
push esi
push edi
push 0x4cd0c4
call ebx
cmp eax, esi
jb 0x420786
lea esi, [eax + 1]
lea ecx, [esi + esi]
push ecx
push edi
call fcn.004412e0
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x420795
push esi
mov edx, eax
push edx
push 0x4cd0c4
call ebx
mov edi, dword [ebp - 0x14]
lea ecx, [esi - 1]
cmp eax, ecx
jb 0x42078f
mov eax, ecx
xor ecx, ecx
mov word [edi + eax*2], cx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push 2
push 0x208
mov dword [ebp - 0x30], eax
call fcn.004412c0
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4207c2
push 0x208
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 2
push 0x208
call fcn.004412c0
mov edi, eax
add esp, 8
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x4207e6
push edi
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 2
push 0x800
call fcn.004412c0
mov esi, eax
add esp, 8
mov dword [ebp - 0x18], esi
test esi, esi
je 0x42095b
call fcn.004ad0f0
neg eax
sbb eax, eax
and eax, 0x100
lea edx, [ebp - 0x10]
push edx
or eax, 0x20019
push eax
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionConsoleTrueTypeFont
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x42095b
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x1a4]
push ecx
push 0
push edx
mov dword [ebp - 8], 0x40
mov dword [ebp - 0xc], 0x7e
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x420951
mov eax, dword [ebp - 8]
inc dword [ebp - 4]
cmp eax, 0x3f
jbe 0x420885
mov eax, 0x3f
xor ecx, ecx
mov word [ebp + eax*2 - 0x1a4], cx
mov eax, dword [ebp - 0xc]
shr eax, 1
cmp eax, 0x3f
jbe 0x42089e
mov eax, 0x3f
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor edx, edx
mov word [ebp + eax*2 - 0x124], dx
lea eax, [ebp - 0x1a4]
push eax
call edi
lea ecx, [ebp - 0x124]
push ecx
mov ebx, eax
call edi
mov edi, eax
lea edx, [edi + ebx + 3]
cmp edx, 0x800
jge 0x42090e
cmp dword [ebp - 4], 1
jbe 0x4208e1
mov eax, 9
mov word [esi], ax
add esi, 2
lea ecx, [ebp - 0x1a4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [esi + ebx*2]
mov edx, 9
lea eax, [ebp - 0x124]
mov word [esi], dx
add esi, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [esi + edi*2]
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x124]
push edx
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
push 0
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x1a4]
push edx
push eax
push ecx
mov dword [ebp - 8], 0x40
mov dword [ebp - 0xc], 0x7e
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x420875
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x420971
push eax
call ebx
inc eax
mov dword [ebp - 0xc], eax
jmp 0x42097b
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
add eax, eax
mov dword [ebp - 0x34], eax
lea esi, [eax + 0x3bc]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x420996
push eax
call ebx
inc eax
mov dword [ebp - 4], eax
jmp 0x4209a0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add eax, eax
add esi, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4209b7
push eax
call ebx
inc eax
mov dword [ebp - 0x10], eax
jmp 0x4209c1
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
add eax, eax
add esi, eax
mov dword [ebp - 0x48], eax
test edi, edi
je 0x4209d5
push edi
call ebx
inc eax
mov dword [ebp - 8], eax
jmp 0x4209df
mov dword [ebp - 8], 0
mov eax, dword [ebp - 8]
add eax, eax
add esi, eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x98]
test eax, eax
je 0x4209f9
push eax
call ebx
inc eax
mov dword [ebp - 0x20], eax
jmp 0x420a03
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
add eax, eax
add esi, eax
mov dword [ebp - 0x38], eax
test edi, edi
je 0x420a1a
push edi
call ebx
inc eax
mov dword [ebp - 0x28], eax
jmp 0x420a24
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x28]
lea esi, [esi + eax*2]
push 1
push esi
call fcn.004412c0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x420cdc
mov dword [ebx], esi
lea edi, [ebx + 4]
mov ecx, 0x11
lea esi, [ebp - 0xa4]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x48]
mov ecx, 0x47
lea esi, [ebp - 0x2c0]
rep movsd dword es:[edi], dword [esi]
call fcn.004ad0e0
movzx eax, al
mov dword [ebx + 0x1a8], eax
call fcn.004ad060
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
movzx ecx, al
push str.ReactOS
mov dword [ebx + 0x1a0], ecx
call esi
lea edx, [ebp - 0x2ac]
push edx
mov edi, eax
call esi
cmp word [ebp + eax*2 - 0x2aa], 0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea eax, [ebp + eax*2 - 0x2aa]
je 0x420ad1
lea ecx, [eax + edi*2 + 2]
lea edx, [ebp - 0x1ac]
cmp ecx, edx
jae 0x420ad1
push str.ReactOS
xor ecx, ecx
push eax
mov word [eax + edi*2], cx
call esi
neg eax
sbb eax, eax
inc eax
mov dword [ebx + 0x1a4], eax
cmp dword [ebx + 0x1a4], 0
jne 0x420b5a
cmp dword [ebp - 0x2bc], 5
jne 0x420b5a
lea edx, [ebp - 0x1c]
push edx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x420b5a
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x124]
push ecx
push 0
push 0
push str.ProductName
push edx
mov dword [ebp - 0x40], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x420b50
push str.ReactOS
lea ecx, [ebp - 0x124]
push ecx
mov word [ebp + edi*2 - 0x124], ax
call esi
neg eax
sbb eax, eax
inc eax
mov dword [ebx + 0x1a4], eax
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebx + 0x1ac], eax
call dword [sym.imp.KERNEL32.dll_GetOEMCP]
push ebx
push 0x41f420
push 0
push 0
mov dword [ebx + 0x1b0], eax
mov dword [ebx + 0x1b4], 0
call dword [sym.imp.USER32.dll_EnumDisplayMonitors]
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x420bcb
push str.GetConsoleHistoryInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x420bcb
lea esi, [ebx + 0x164]
push esi
mov dword [esi], 0x10
call eax
test eax, eax
jne 0x420bcb
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0x80000000
mov dword [esi], eax
lea eax, [ebx + 0x174]
lea ecx, [ebx + 0x17c]
lea edx, [ebx + 0x184]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], 0xfffffff6
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], 0xfffffff5
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], 0xfffffff4
xor esi, esi
lea ecx, [ecx]
mov eax, dword [ebp + esi*8 - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, dword [ebp + esi*8 - 0x60]
lea edi, [ecx + 4]
push edi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x420c26
mov dword [edi], 0xffffffff
inc esi
cmp esi, 3
jb 0x420c00
mov eax, dword [ebp - 0x30]
lea esi, [ebx + 0x3bc]
test eax, eax
je 0x420c4d
mov ecx, dword [ebp - 0x10]
push eax
push ecx
push esi
call fcn.00401800
mov dword [ebx + 0x18c], esi
add esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x420c68
mov edx, dword [ebp - 4]
push eax
push edx
push esi
call fcn.00401800
mov dword [ebx + 0x190], esi
add esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x420c83
push eax
mov eax, dword [ebp - 8]
push eax
push esi
call fcn.00401800
mov dword [ebx + 0x194], esi
add esi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x420ca4
mov edi, dword [ebp - 0xc]
push eax
push edi
push esi
call fcn.00401800
mov dword [ebx + 0x198], esi
add esi, dword [ebp - 0x34]
mov dword [ebx + 0x19c], edi
mov eax, dword [ebp - 0x98]
test eax, eax
je 0x420cbf
mov ecx, dword [ebp - 0x20]
push eax
push ecx
push esi
call fcn.00401800
mov dword [ebx + 0x10], esi
add esi, dword [ebp - 0x38]
cmp dword [ebp - 0x18], 0
je 0x420cd9
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
push edx
push eax
push esi
call fcn.00401800
mov dword [ebx + 0x3b8], esi
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x420cec
push eax
call fcn.00441300
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x420cfc
push eax
call fcn.00441300
add esp, 4
test edi, edi
je 0x420d09
push edi
call fcn.00441300
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret