Function at 0x404020
Capabilities:
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x40e2f8
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x41401c]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41401c]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x88]
mov esi, ecx
xor ebx, ebx
mov edi, edx
mov dword [esp + 0x30], edi
cmp esi, ebx
je 0x40432c
cmp edi, ebx
je 0x40432c
push esi
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
cmp eax, 0x64
jge 0x404088
mov eax, 0x3e8
mov ecx, 2
mov dword [esp + 0x28], eax
mul ecx
mov dword [esp + 0x24], ebx
cmp edx, ebx
ja 0x4040a0
cmp eax, 0xffffffff
jbe 0x4040a4
xor eax, eax
jmp 0x4040ab
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [esp + 0x2c], eax
cmp eax, ebx
je 0x4040b8
xor edx, edx
mov word [eax], dx
mov dword [esp + 0x80], ebx
cmp eax, ebx
jne 0x4040d4
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, 0x8007000e
jmp 0x404331
mov al, byte [0x414dd9]
mov dword [ebp], esi
mov byte [esp + 0x1f], al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x17], 0
mov byte [esp + 0x16], 0
cmp word [esi], bx
je 0x4042e1
jmp 0x404100
cmp byte [esp + 0x1f], 1
jne 0x4041fe
cmp dword [esp + 0x20], ebx
jne 0x40416a
mov eax, dword [ebp]
push str.HKCR
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
cmp eax, ebx
je 0x40416a
mov ecx, dword [ebp]
cmp eax, ecx
jne 0x40416a
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
push ecx
call ebx
push eax
mov dword [ebp], eax
call ebx
push eax
mov dword [ebp], eax
call ebx
push eax
mov dword [ebp], eax
call ebx
lea ecx, [esp + 0x24]
push ecx
mov ecx, str.HKCU_r_n_tSoftware_r_n_t_r_n_t_tClasses
mov dword [ebp], eax
call fcn.00403ef0
test eax, eax
je 0x404230
mov byte [esp + 0x17], 1
jmp 0x404170
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
mov edx, dword [ebp]
mov eax, 0x27
cmp ax, word [edx]
jne 0x4041b9
cmp byte [esp + 0x16], 0
jne 0x40418b
mov byte [esp + 0x16], 1
jmp 0x404204
mov eax, ebp
call fcn.00404c20
test eax, eax
je 0x40419d
mov byte [esp + 0x16], 0
jmp 0x4041c0
mov ecx, dword [ebp]
push ecx
call ebx
push eax
mov edi, 1
lea esi, [esp + 0x28]
mov dword [ebp], eax
call fcn.00403f80
test eax, eax
je 0x404230
cmp byte [esp + 0x16], 0
jne 0x404204
mov edx, dword [ebp]
movzx eax, word [edx]
cmp ax, 0x7b
jne 0x4041d0
inc dword [esp + 0x20]
cmp ax, 0x7d
jne 0x404204
sub dword [esp + 0x20], 1
jne 0x404204
cmp byte [esp + 0x17], 1
jne 0x404204
lea eax, [esp + 0x24]
push eax
mov ecx, str._r_n_t_r_n_r_n
call fcn.00403ef0
test eax, eax
je 0x404230
mov byte [esp + 0x17], 0
jmp 0x404204
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
mov eax, dword [ebp]
cmp word [eax], 0x25
push eax
jne 0x40421a
call ebx
mov dword [ebp], eax
cmp word [eax], 0x25
jne 0x40424c
push eax
mov edi, 1
lea esi, [esp + 0x28]
call fcn.00403f80
test eax, eax
jne 0x4042c7
mov edx, dword [esp + 0x2c]
push edx
mov dword [esp + 0x1c], 0x8007000e
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x18]
jmp 0x404331
mov ebx, 0x25
call fcn.00404360
mov esi, eax
test esi, esi
je 0x4042fa
mov ecx, dword [ebp]
sub eax, ecx
sar eax, 1
cmp eax, 0x1f
jg 0x404313
push eax
push ecx
lea ecx, [esp + 0x3c]
push 0x20
push ecx
call dword [sym.imp.MSVCR90.dll_wcsncpy_s]
push eax
call fcn.00402b20
mov eax, dword [ebp + 4]
add esp, 0x14
lea edx, [esp + 0x34]
push edx
call fcn.00403e80
test eax, eax
je 0x4042fa
lea ecx, [esp + 0x24]
push ecx
mov ecx, eax
call fcn.00403ef0
test eax, eax
je 0x404230
cmp dword [ebp], esi
je 0x4042c1
mov edi, edi
mov edx, dword [ebp]
push edx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp], eax
cmp eax, esi
jne 0x4042b0
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
mov eax, dword [ebp]
push eax
call ebx
mov ecx, eax
xor ebx, ebx
mov dword [ebp], eax
cmp word [ecx], bx
jne 0x404100
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov edx, ebx
push edx
mov dword [esp + 0x30], ebx
mov dword [edi], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x18]
jmp 0x404331
mov edx, dword [esp + 0x2c]
push edx
mov dword [esp + 0x1c], 0x80020009
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x18]
jmp 0x404331
mov edx, dword [esp + 0x2c]
push edx
mov dword [esp + 0x1c], 0x80004005
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x18]
jmp 0x404331
mov eax, 0x80004003
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0040cd4c
add esp, 0x70
ret 4