Function at 0x40b990
Capabilities:
Get thread local storage value
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eeee3
mov eax, dword fs:[0]
push eax
sub esp, 0x394
mov eax, dword [0x535a40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
push 2
mov dword [ebp - 0x340], edi
mov dword [ebp - 0x358], eax
mov dword [ebp - 0x354], ebx
call fcn.004c8d7a
xor ecx, ecx
mov dword [ebp - 0x368], eax
mov word [eax], cx
push 2
mov dword [ebp - 4], ecx
call fcn.004c8d7a
xor ecx, ecx
mov dword [ebp - 0x378], eax
mov word [eax], cx
push 2
call fcn.004c8d7a
xor ecx, ecx
mov dword [ebp - 0x38c], eax
mov word [eax], cx
push 2
call fcn.004c8d7a
xor ecx, ecx
mov dword [ebp - 0x374], eax
add esp, 0x10
mov word [eax], cx
cmp dword [ebp + 0x14], 0xffffffff
mov esi, 0x4f9d20
mov byte [ebp - 4], 3
jne 0x40bc2b
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x348], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x344], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x364], eax
call fcn.004c8d5f
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x360], eax
call fcn.004c8d5f
test edi, edi
cmovne esi, edi
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x35c], eax
call fcn.004c8d5f
add esp, 0x40
lea eax, [ebp - 0x360]
push eax
lea eax, [ebp - 0x35c]
push eax
lea eax, [ebp - 0x34c]
push ebx
push eax
call fcn.00409cf0
mov ebx, eax
push 0x4faa0c
call fcn.004c8d00
mov edi, eax
push 0
mov dword [ebp - 0x350], edi
call fcn.004c8d5f
push esi
call fcn.004c8d00
mov esi, eax
push 0
mov dword [ebp - 0x370], esi
call fcn.004c8d5f
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x370]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x36c]
push eax
call fcn.00409cf0
push 0xffffffffffffffff
push 0
push 0
lea ecx, [ebp - 0x33c]
mov byte [ebp - 4], 0xf
push ecx
movzx ecx, byte [ebp + 0x18]
push ecx
push 0
lea ecx, [ebp - 0x338]
push ecx
lea ecx, [ebp - 0x334]
push ecx
lea ecx, [ebp - 0x348]
push ecx
lea ecx, [ebp - 0x344]
push ecx
lea ecx, [ebp - 0x364]
push ecx
push ebx
push eax
push 0
push 0xffffffffffffffff
push 0
push dword [ebp - 0x358]
call fcn.00405550
add esp, 0x74
mov dword [ebp + 0x14], eax
push dword [ebp - 0x36c]
call fcn.004c8d5f
push esi
call fcn.004c8d5f
push edi
call fcn.004c8d5f
push dword [ebp - 0x34c]
call fcn.004c8d5f
push dword [ebp - 0x35c]
call fcn.004c8d5f
push dword [ebp - 0x360]
call fcn.004c8d5f
push dword [ebp - 0x364]
call fcn.004c8d5f
push dword [ebp - 0x344]
call fcn.004c8d5f
push dword [ebp - 0x348]
call fcn.004c8d5f
push dword [ebp - 0x334]
call fcn.004c8d5f
push dword [ebp - 0x338]
call fcn.004c8d5f
push dword [ebp - 0x33c]
mov byte [ebp - 4], 3
call fcn.004c8d5f
mov ebx, dword [ebp - 0x354]
add esp, 0x30
mov edi, dword [ebp - 0x340]
mov esi, 0x4f9d20
lea eax, [ebp - 0x388]
push eax
push dword [0x539fd0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push edi
push ebx
call fcn.004086c0
add esp, 0x14
test eax, eax
jne 0x40c23a
lea eax, [ebp - 0x384]
mov dword [ebp - 0x384], 0x320
push eax
lea eax, [ebp - 0x330]
push eax
push 0
push 0
push 0x4f9d20
push dword [ebp - 0x388]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c22e
cmp dword [ebp - 0x384], eax
je 0x40c22e
push 2
call fcn.004c8d7a
xor ecx, ecx
mov dword [ebp - 0x39c], eax
mov dword [ebp - 0x398], ecx
mov dword [ebp - 0x394], ecx
mov word [eax], cx
mov dword [ebp - 0x390], ecx
lea eax, [ebp - 0x39c]
mov byte [ebp - 4], 0x10
push eax
lea eax, [ebp - 0x330]
push eax
call fcn.00408a50
add esp, 0xc
test al, al
je 0x40c215
mov eax, dword [ebp - 0x398]
mov ecx, 0x4fa97c
mov eax, dword [eax]
mov dword [ebp - 0x370], eax
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40bd18
test dx, dx
je 0x40bd14
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40bd18
add eax, 4
add ecx, 4
test dx, dx
jne 0x40bcf2
xor eax, eax
jmp 0x40bd1d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c215
push 0
lea eax, [ebp - 0x39c]
push eax
push dword [ebp - 0x358]
lea eax, [ebp - 0x340]
push eax
call fcn.004069d0
add esp, 0x10
lea ecx, [ebp - 0x368]
push eax
call fcn.00404e30
push dword [ebp - 0x340]
call fcn.004c8d5f
push 0x4faa0c
call fcn.004c8d00
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8d5f
test edi, edi
cmovne esi, edi
push esi
mov dword [ebp - 0x36c], esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8d5f
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x344]
push ebx
push eax
call fcn.00409cf0
mov dword [ebp - 0x350], eax
push 0x4f9d20
call fcn.004c8d00
mov edi, eax
push 0
mov dword [ebp - 0x340], edi
call fcn.004c8d5f
push esi
call fcn.004c8d00
mov esi, eax
push 0
mov dword [ebp - 0x34c], esi
call fcn.004c8d5f
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x348]
push ebx
push eax
call fcn.00409cf0
add esp, 0x44
mov ebx, eax
mov eax, dword [ebp - 0x370]
mov ecx, 0x4f9d20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8d00
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8d5f
lea eax, [ebp - 0x3a0]
mov byte [ebp - 4], 0x17
push eax
lea eax, [ebp - 0x374]
push eax
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x368]
push eax
push dword [ebp - 0x350]
lea eax, [ebp - 0x33c]
push ebx
push eax
push dword [ebp - 0x358]
call fcn.00405240
push dword [ebp - 0x33c]
mov bl, al
call fcn.004c8d5f
push dword [ebp - 0x348]
call fcn.004c8d5f
push esi
call fcn.004c8d5f
push edi
call fcn.004c8d5f
push dword [ebp - 0x344]
call fcn.004c8d5f
push dword [ebp - 0x338]
call fcn.004c8d5f
add esp, 0x40
mov byte [ebp - 4], 0x10
push dword [ebp - 0x334]
call fcn.004c8d5f
add esp, 4
test bl, bl
je 0x40c215
cmp dword [ebp + 0x14], 0xffffffff
jne 0x40c0c1
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x35c], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x360], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x364], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x344], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x348], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8d5f
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8d5f
mov esi, dword [ebp - 0x36c]
push esi
call fcn.004c8d00
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8d5f
add esp, 0x40
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x33c]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x380]
push eax
call fcn.00409cf0
mov ebx, eax
push 0x4faa0c
call fcn.004c8d00
mov edi, eax
push 0
mov dword [ebp - 0x340], edi
call fcn.004c8d5f
push esi
call fcn.004c8d00
mov esi, eax
push 0
mov dword [ebp - 0x34c], esi
call fcn.004c8d5f
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x34c]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x37c]
push eax
call fcn.00409cf0
movzx ecx, byte [ebp + 0x18]
lea edx, [ebp - 0x35c]
push 0xffffffffffffffff
push 0
push 0
push edx
push ecx
push 0
mov dword [ebp - 0x350], ecx
lea ecx, [ebp - 0x360]
push ecx
lea ecx, [ebp - 0x364]
mov byte [ebp - 4], 0x23
push ecx
lea ecx, [ebp - 0x344]
push ecx
lea ecx, [ebp - 0x348]
push ecx
lea ecx, [ebp - 0x334]
push ecx
push ebx
push eax
push 0
push 0xffffffffffffffff
push 0
push dword [ebp - 0x358]
call fcn.00405550
add esp, 0x74
mov dword [ebp + 0x14], eax
push dword [ebp - 0x37c]
call fcn.004c8d5f
push esi
call fcn.004c8d5f
push edi
call fcn.004c8d5f
push dword [ebp - 0x380]
call fcn.004c8d5f
push dword [ebp - 0x33c]
call fcn.004c8d5f
push dword [ebp - 0x338]
call fcn.004c8d5f
push dword [ebp - 0x334]
call fcn.004c8d5f
push dword [ebp - 0x348]
call fcn.004c8d5f
push dword [ebp - 0x344]
call fcn.004c8d5f
push dword [ebp - 0x364]
call fcn.004c8d5f
push dword [ebp - 0x360]
call fcn.004c8d5f
push dword [ebp - 0x35c]
call fcn.004c8d5f
add esp, 0x30
jmp 0x40c0cb
movzx eax, byte [ebp + 0x18]
mov dword [ebp - 0x350], eax
push 0x4f9d20
call fcn.004c8d00
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8d5f
mov eax, dword [ebp - 0x3a0]
push 0x4f9d20
mov dword [ebp - 0x37c], eax
call fcn.004c8d00
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8d5f
push 0x4faa0c
call fcn.004c8d00
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8d5f
push dword [ebp - 0x36c]
call fcn.004c8d00
mov edi, eax
push 0
mov dword [ebp - 0x380], edi
call fcn.004c8d5f
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x380]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x34c]
push eax
call fcn.00409cf0
mov ebx, eax
mov eax, dword [ebp - 0x370]
mov ecx, 0x4f9d20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8d00
mov esi, eax
push 0
mov dword [ebp - 0x340], esi
call fcn.004c8d5f
push 0xffffffffffffffff
push 0
push 0
lea eax, [ebp - 0x334]
mov byte [ebp - 4], 0x29
push eax
push dword [ebp - 0x350]
lea eax, [ebp - 0x338]
push dword [ebp - 0x37c]
push eax
lea eax, [ebp - 0x374]
push eax
lea eax, [ebp - 0x38c]
push eax
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x368]
push eax
push ebx
lea eax, [ebp - 0x340]
push eax
push 0xc
push dword [ebp + 0x14]
push 0xffffffffffffffff
push dword [ebp - 0x358]
call fcn.00405550
add esp, 0x7c
push esi
call fcn.004c8d5f
push dword [ebp - 0x34c]
call fcn.004c8d5f
push edi
call fcn.004c8d5f
push dword [ebp - 0x33c]
call fcn.004c8d5f
push dword [ebp - 0x338]
call fcn.004c8d5f
push dword [ebp - 0x334]
call fcn.004c8d5f
add esp, 0x18
lea ecx, [ebp - 0x398]
call fcn.004028a0
push dword [ebp - 0x39c]
call fcn.004c8d5f
add esp, 4
push dword [ebp - 0x388]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x374]
call fcn.004c8d5f
push dword [ebp - 0x38c]
call fcn.004c8d5f
push dword [ebp - 0x378]
call fcn.004c8d5f
push dword [ebp - 0x368]
call fcn.004c8d5f
mov eax, dword [ebp + 0x14]
add esp, 0x10
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c34b7
mov esp, ebp
pop ebp
ret