Function at 0x417220
Capabilities:
Get number of processors
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4aaeb4
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov ecx, 0x4eb358
push ebx
push ebp
push esi
push edi
call fcn.00418750
mov al, byte [eax + 0xb0]
mov ebp, dword [esp + 0x4c]
and al, 1
cmp al, 1
je 0x41732f
cmp dword [esp + 0x48], 0x64
jae 0x41726a
cmp ebp, 0x64
jb 0x41732f
mov eax, dword [0x4eb358]
or ebx, 0xffffffff
xor esi, esi
cmp eax, ebx
je 0x417314
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x417314
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x48], eax
test eax, eax
mov dword [esp + 0x38], esi
je 0x4172b1
mov ecx, eax
call fcn.00418520
mov esi, eax
jmp 0x4172b3
xor esi, esi
mov ecx, dword [0x4eb358]
push esi
push ecx
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4172e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x48]
push 0x4cb060
push edx
mov dword [esp + 0x50], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov edi, eax
push 0x4eb360
mov dword [edi], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4eb35c]
push 0x4eb360
mov dword [edi + 4], eax
mov dword [0x4eb35c], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esi + 0xb4], ebx
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
lea ecx, [esp + 0x10]
call fcn.00420c60
mov eax, dword [0x4eb358]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
xor esi, esi
cmp eax, 0xffffffff
mov dword [esp + 0x38], 1
je 0x4173ec
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4173ec
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x4c], eax
test eax, eax
mov byte [esp + 0x38], 2
je 0x41738c
mov ecx, eax
call fcn.00418520
mov esi, eax
jmp 0x41738e
xor esi, esi
mov ecx, dword [0x4eb358]
push esi
push ecx
mov byte [esp + 0x40], 1
call ebx
test eax, eax
jne 0x4173ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x4c]
push 0x4cb060
push edx
mov dword [esp + 0x54], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov edi, eax
push 0x4eb360
mov dword [edi], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4eb35c]
push 0x4eb360
mov dword [edi + 4], eax
mov dword [0x4eb35c], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x20]
push ecx
push edx
lea ecx, [esp + 0x18]
call fcn.00420fd0
mov eax, dword [0x4eb358]
xor edi, edi
cmp eax, 0xffffffff
je 0x4174a3
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x4174a3
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x4c], eax
test eax, eax
mov byte [esp + 0x38], 3
je 0x417443
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x417445
xor edi, edi
mov eax, dword [0x4eb358]
push edi
push eax
mov byte [esp + 0x40], 1
call ebx
test eax, eax
jne 0x417470
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x4c]
push 0x4cb060
push ecx
mov dword [esp + 0x54], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add edi, 0x28
lea ecx, [esp + 0x10]
push edi
call fcn.00420ff0
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x48]
push ebp
push edx
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00421f00
mov ebp, eax
mov eax, dword [0x4eb358]
xor edi, edi
cmp eax, 0xffffffff
je 0x41757c
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x41757c
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x48], eax
test eax, eax
mov byte [esp + 0x38], 4
je 0x41751b
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x41751d
xor edi, edi
mov edx, dword [0x4eb358]
push edi
push edx
mov byte [esp + 0x40], 1
call ebx
test eax, eax
jne 0x417549
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x48]
push 0x4cb060
push eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], ecx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov dword [edi + 0xb4], edx
mov dword [esp + 0x38], 0xffffffff
call fcn.00420e20
mov ecx, dword [esp + 0x30]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2c
ret