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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f0943
mov eax, dword fs:[0]
push eax
sub esp, 0x394
mov eax, dword [0x53ba20]
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.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x368], eax
mov word [eax], cx
push 2
mov dword [ebp - 4], ecx
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x378], eax
mov word [eax], cx
push 2
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x38c], eax
mov word [eax], cx
push 2
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x374], eax
add esp, 0x10
mov word [eax], cx
cmp dword [ebp + 0x14], 0xffffffff
mov esi, 0x4fbd20
mov byte [ebp - 4], 3
jne 0x40bc6b
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x348], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x344], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x364], eax
call fcn.004c8c7f
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x360], eax
call fcn.004c8c7f
test edi, edi
cmovne esi, edi
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x35c], eax
call fcn.004c8c7f
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.00409d10
mov ebx, eax
push 0x4fca0c
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x350], edi
call fcn.004c8c7f
push esi
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x370], esi
call fcn.004c8c7f
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x370]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x36c]
push eax
call fcn.00409d10
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.00405510
add esp, 0x74
mov dword [ebp + 0x14], eax
push dword [ebp - 0x36c]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
push edi
call fcn.004c8c7f
push dword [ebp - 0x34c]
call fcn.004c8c7f
push dword [ebp - 0x35c]
call fcn.004c8c7f
push dword [ebp - 0x360]
call fcn.004c8c7f
push dword [ebp - 0x364]
call fcn.004c8c7f
push dword [ebp - 0x344]
call fcn.004c8c7f
push dword [ebp - 0x348]
call fcn.004c8c7f
push dword [ebp - 0x334]
call fcn.004c8c7f
push dword [ebp - 0x338]
call fcn.004c8c7f
push dword [ebp - 0x33c]
mov byte [ebp - 4], 3
call fcn.004c8c7f
mov ebx, dword [ebp - 0x354]
add esp, 0x30
mov edi, dword [ebp - 0x340]
mov esi, 0x4fbd20
lea eax, [ebp - 0x388]
push eax
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push edi
push ebx
call fcn.00408690
add esp, 0x14
test eax, eax
jne 0x40c27a
lea eax, [ebp - 0x384]
mov dword [ebp - 0x384], 0x320
push eax
lea eax, [ebp - 0x330]
push eax
push 0
push 0
push 0x4fbd20
push dword [ebp - 0x388]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c26e
cmp dword [ebp - 0x384], eax
je 0x40c26e
push 2
call fcn.004c8c9a
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.00408a20
add esp, 0xc
test al, al
je 0x40c255
mov eax, dword [ebp - 0x398]
mov ecx, 0x4fc97c
mov eax, dword [eax]
mov dword [ebp - 0x370], eax
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40bd58
test dx, dx
je 0x40bd54
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40bd58
add eax, 4
add ecx, 4
test dx, dx
jne 0x40bd32
xor eax, eax
jmp 0x40bd5d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c255
push 0
lea eax, [ebp - 0x39c]
push eax
push dword [ebp - 0x358]
lea eax, [ebp - 0x340]
push eax
call fcn.004069a0
add esp, 0x10
lea ecx, [ebp - 0x368]
push eax
call fcn.00404de0
push dword [ebp - 0x340]
call fcn.004c8c7f
push 0x4fca0c
call fcn.004c8c20
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8c7f
test edi, edi
cmovne esi, edi
push esi
mov dword [ebp - 0x36c], esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8c7f
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x344]
push ebx
push eax
call fcn.00409d10
mov dword [ebp - 0x350], eax
push 0x4fbd20
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x340], edi
call fcn.004c8c7f
push esi
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x34c], esi
call fcn.004c8c7f
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x348]
push ebx
push eax
call fcn.00409d10
add esp, 0x44
mov ebx, eax
mov eax, dword [ebp - 0x370]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8c7f
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.00405200
push dword [ebp - 0x33c]
mov bl, al
call fcn.004c8c7f
push dword [ebp - 0x348]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
push edi
call fcn.004c8c7f
push dword [ebp - 0x344]
call fcn.004c8c7f
push dword [ebp - 0x338]
call fcn.004c8c7f
add esp, 0x40
mov byte [ebp - 4], 0x10
push dword [ebp - 0x334]
call fcn.004c8c7f
add esp, 4
test bl, bl
je 0x40c255
cmp dword [ebp + 0x14], 0xffffffff
jne 0x40c101
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x35c], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x360], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x364], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x344], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x348], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8c7f
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8c7f
mov esi, dword [ebp - 0x36c]
push esi
call fcn.004c8c20
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8c7f
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.00409d10
mov ebx, eax
push 0x4fca0c
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x340], edi
call fcn.004c8c7f
push esi
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x34c], esi
call fcn.004c8c7f
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x34c]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x37c]
push eax
call fcn.00409d10
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.00405510
add esp, 0x74
mov dword [ebp + 0x14], eax
push dword [ebp - 0x37c]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
push edi
call fcn.004c8c7f
push dword [ebp - 0x380]
call fcn.004c8c7f
push dword [ebp - 0x33c]
call fcn.004c8c7f
push dword [ebp - 0x338]
call fcn.004c8c7f
push dword [ebp - 0x334]
call fcn.004c8c7f
push dword [ebp - 0x348]
call fcn.004c8c7f
push dword [ebp - 0x344]
call fcn.004c8c7f
push dword [ebp - 0x364]
call fcn.004c8c7f
push dword [ebp - 0x360]
call fcn.004c8c7f
push dword [ebp - 0x35c]
call fcn.004c8c7f
add esp, 0x30
jmp 0x40c10b
movzx eax, byte [ebp + 0x18]
mov dword [ebp - 0x350], eax
push 0x4fbd20
call fcn.004c8c20
push 0
mov dword [ebp - 0x334], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x3a0]
push 0x4fbd20
mov dword [ebp - 0x37c], eax
call fcn.004c8c20
push 0
mov dword [ebp - 0x338], eax
call fcn.004c8c7f
push 0x4fca0c
call fcn.004c8c20
push 0
mov dword [ebp - 0x33c], eax
call fcn.004c8c7f
push dword [ebp - 0x36c]
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x380], edi
call fcn.004c8c7f
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x380]
push eax
push dword [ebp - 0x354]
lea eax, [ebp - 0x34c]
push eax
call fcn.00409d10
mov ebx, eax
mov eax, dword [ebp - 0x370]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x340], esi
call fcn.004c8c7f
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.00405510
add esp, 0x7c
push esi
call fcn.004c8c7f
push dword [ebp - 0x34c]
call fcn.004c8c7f
push edi
call fcn.004c8c7f
push dword [ebp - 0x33c]
call fcn.004c8c7f
push dword [ebp - 0x338]
call fcn.004c8c7f
push dword [ebp - 0x334]
call fcn.004c8c7f
add esp, 0x18
lea ecx, [ebp - 0x398]
call fcn.004028a0
push dword [ebp - 0x39c]
call fcn.004c8c7f
add esp, 4
push dword [ebp - 0x388]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x374]
call fcn.004c8c7f
push dword [ebp - 0x38c]
call fcn.004c8c7f
push dword [ebp - 0x378]
call fcn.004c8c7f
push dword [ebp - 0x368]
call fcn.004c8c7f
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.004c3287
mov esp, ebp
pop ebp
ret