Function at 0x416850
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x556718
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
mov eax, dword [0x5a2184]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [edi + 4]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
cmp eax, 0xffffffff
je 0x41689f
push eax
call ebp
mov eax, dword [edi + 8]
cmp eax, ebx
mov dword [edi + 4], 0xffffffff
je 0x41689f
push eax
call ebp
mov dword [edi + 8], ebx
call fcn.00517e28
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4168b9
push 0x80004005
call fcn.00402db0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x14]
push str..COM_d
push edx
mov dword [esp + 0x44], ebx
call fcn.004030d0
add esp, 0xc
push ebx
neg esi
sbb esi, esi
and esi, 0x40000000
push esi
mov esi, dword [esp + 0x18]
push 3
push ebx
push ebx
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [edi + 4], eax
jne 0x416919
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.004167d0
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [edi + 8], eax
jne 0x416959
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x416952
push eax
call ebp
mov eax, dword [edi + 8]
cmp eax, ebx
mov dword [edi + 4], 0xffffffff
je 0x416952
push eax
call ebp
mov dword [edi + 8], ebx
mov ecx, esi
call fcn.004167d0
mov ecx, dword [edi + 4]
lea eax, [esp + 0x14]
push eax
push ecx
mov dword [esp + 0x1c], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x416981
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.004167d0
mov eax, dword [esp + 0x48]
cmp eax, 4
mov edx, dword [esp + 0x44]
mov dword [esp + 0x18], edx
mov cl, 2
ja case.default.0x416994
jmp dword [eax*4 + 0x416ac8]
mov byte [esp + 0x27], cl
jmp case.default.0x416994
mov byte [esp + 0x27], 3
jmp case.default.0x416994
mov byte [esp + 0x27], bl
jmp case.default.0x416994
mov byte [esp + 0x27], 1
jmp case.default.0x416994
mov byte [esp + 0x27], 4
mov al, byte [esp + 0x4c]
mov byte [esp + 0x26], al
mov eax, dword [esp + 0x50]
sub eax, ebx
je 0x4169e1
sub eax, 1
je 0x4169da
sub eax, 1
jne 0x4169e5
mov byte [esp + 0x28], cl
jmp 0x4169e5
mov byte [esp + 0x28], 1
jmp 0x4169e5
mov byte [esp + 0x28], bl
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x54]
and eax, 0xffffffbf
cmp ecx, 5
mov dword [esp + 0x1c], eax
ja case.default.0x4169f9
jmp dword [ecx*4 + 0x416adc]
and eax, 0xfffffcf3
mov dword [esp + 0x1c], eax
jmp case.default.0x4169f9
and eax, 0xffffecf7
or eax, 0x2004
mov dword [esp + 0x1c], eax
jmp case.default.0x4169f9
and eax, 0xfffffce7
or eax, 0x24
mov dword [esp + 0x1c], eax
jmp case.default.0x4169f9
and eax, 0xffffecfb
or eax, 0x2008
mov dword [esp + 0x1c], eax
jmp case.default.0x4169f9
and eax, 0xfffffceb
or eax, 0x28
mov dword [esp + 0x1c], eax
jmp case.default.0x4169f9
and eax, 0xfffffff3
or eax, 0x300
mov dword [esp + 0x1c], eax
mov eax, 0x64
mov byte [esp + 0x29], 0x11
mov byte [esp + 0x2a], 0x13
mov word [esp + 0x24], ax
mov word [esp + 0x22], ax
mov edx, dword [edi + 4]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x416a8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.004167d0
lea eax, [esi - 0x10]
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416ab0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 0x18