Function at 0x4084e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c895
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x46d45c]
xor eax, ebp
mov dword [ebp - 0x4c], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x6c], 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418a00
test eax, eax
jne 0x408547
push str._bad_command_
mov ecx, dword [ebp + 8]
call fcn.00402190
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x6c]
or eax, 1
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 8]
jmp 0x408e8b
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402280
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00402160
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.00402160
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00402160
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.00407ab0
add esp, 8
mov byte [ebp - 4], 5
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402280
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2c]
call fcn.00416f40
push 0x454914
call fcn.00438225
add esp, 4
push eax
push 0x454920
lea ecx, [ebp - 0x2c]
call fcn.00402270
push eax
call fcn.00438fb4
add esp, 0xc
test eax, eax
jne 0x408601
lea ecx, [ebp - 0x14]
call fcn.00402270
mov esi, eax
push 0x45492c
call fcn.00438225
add esp, 4
lea ecx, [esi + eax*2]
push ecx
lea ecx, [ebp - 0x30]
call fcn.004021e0
jmp 0x408680
push 0x454938
call fcn.00438225
add esp, 4
push eax
push str.SYSTEMROOT_
lea ecx, [ebp - 0x2c]
call fcn.00402270
push eax
call fcn.00438fb4
add esp, 0xc
test eax, eax
jne 0x408674
push 0x46f018
lea ecx, [ebp - 0x28]
call fcn.004021e0
push 0x454970
lea ecx, [ebp - 0x28]
call fcn.004022b0
lea ecx, [ebp - 0x14]
call fcn.00402270
mov esi, eax
push 0x454974
call fcn.00438225
add esp, 4
lea edx, [esi + eax*2]
push edx
lea ecx, [ebp - 0x28]
call fcn.004022b0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x30]
call fcn.00402240
jmp 0x408680
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00402240
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x10]
call fcn.00402280
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x10]
call fcn.00402270
push eax
call fcn.004397e3
add esp, 4
mov eax, dword [0x46f464]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x408761
push 0x454990
lea ecx, [ebp - 0x10]
call fcn.00402270
push eax
call fcn.00416750
add esp, 8
test eax, eax
je 0x408761
push 0x4549b0
lea ecx, [ebp - 0x10]
call fcn.00402270
push eax
call fcn.00416750
add esp, 8
mov esi, eax
lea ecx, [ebp - 0x10]
call fcn.00402270
sub esi, eax
sar esi, 1
mov dword [ebp - 0x34], esi
push 0x1c
push 0x4549d0
lea ecx, [ebp - 0x30]
call fcn.00402270
mov ecx, dword [ebp - 0x34]
lea edx, [eax + ecx*2]
push edx
call fcn.00437b50
add esp, 0xc
lea ecx, [ebp - 0x30]
call fcn.00402270
mov ecx, dword [ebp - 0x34]
lea esi, [eax + ecx*2]
push 0x4549f0
call fcn.00438225
add esp, 4
lea edx, [esi + eax*2]
push edx
lea ecx, [ebp - 0x30]
call fcn.00402270
mov ecx, dword [ebp - 0x34]
lea esi, [eax + ecx*2]
push 0x454a10
call fcn.00438225
add esp, 4
lea edx, [esi + eax*2]
push edx
call fcn.004387e0
add esp, 8
lea ecx, [ebp - 0x30]
call fcn.00402270
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0041d6a0
add esp, 8
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x74], ecx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x74]
push edx
lea ecx, [ebp - 0x28]
call fcn.00402240
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x58]
call fcn.004021c0
lea ecx, [ebp - 0x28]
call fcn.00402270
movzx eax, word [eax]
test eax, eax
je 0x408e21
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x3c]
call fcn.00402190
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x14]
call fcn.00402270
push eax
lea ecx, [ebp - 0x3c]
call fcn.004022b0
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [0x46f464]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
lea ecx, [ebp - 0x3c]
call fcn.00402270
push eax
mov eax, dword [reloc.OLEAUT32.dll_SysReAllocString]
push eax
call fcn.004047c0
add esp, 0x14
test eax, eax
jne 0x4088b3
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.0041d500
add esp, 0xc
test eax, eax
jne 0x4088a9
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00402280
mov edx, dword [ebp - 0x6c]
or edx, 1
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x3c]
call fcn.004021c0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x10]
call fcn.004021c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
call fcn.004021c0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x14]
call fcn.004021c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.004021c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.004021c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004021c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.004021c0
mov eax, dword [ebp + 8]
jmp 0x408e8b
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x38]
call fcn.00402280
mov byte [ebp - 4], 0xa
movzx edx, byte [ebp + 0x10]
test edx, edx
jne 0x408c86
mov eax, 1
test eax, eax
je 0x408c86
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00402280
mov byte [ebp - 4], 0xb
push 0x454a9c
lea ecx, [ebp - 0x28]
call fcn.00402270
push eax
call fcn.00416750
add esp, 8
test eax, eax
je 0x408950
push 0
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.00402270
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x408950
push 1
mov edx, dword [ebp - 0x48]
push edx
lea ecx, [ebp - 0x44]
call fcn.004023f0
push 0
lea ecx, [ebp - 0x44]
call fcn.00402270
push eax
mov eax, dword [ebp - 0x48]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402270
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00402270
push eax
mov ecx, 0x46f6d4
call fcn.00402270
push eax
call fcn.0041d740
add esp, 0xc
movzx edx, al
test edx, edx
jne 0x408a21
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402240
push str..exe
lea ecx, [ebp - 0x2c]
call fcn.004022b0
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00402270
push eax
mov ecx, 0x46f6d4
call fcn.00402270
push eax
call fcn.0041d740
add esp, 0xc
movzx edx, al
test edx, edx
jne 0x408a0e
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402240
push str..dll
lea ecx, [ebp - 0x2c]
call fcn.004022b0
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00402270
push eax
mov ecx, 0x46f6d4
call fcn.00402270
push eax
call fcn.0041d740
add esp, 0xc
movzx edx, al
test edx, edx
je 0x408a0c
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
call fcn.004021c0
jmp 0x408c86
jmp 0x408a1f
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
call fcn.004021c0
jmp 0x408c86
jmp 0x408a54
lea ecx, [ebp - 0x2c]
call fcn.00402270
push eax
call fcn.0041d990
add esp, 4
and eax, 0x10
jne 0x408a54
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402240
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
call fcn.004021c0
jmp 0x408c86
lea ecx, [ebp - 0x28]
call fcn.00402270
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
movzx edx, word [ecx]
cmp edx, 0x20
jne 0x408a75
mov eax, dword [ebp - 0x40]
add eax, 2
mov dword [ebp - 0x40], eax
jmp 0x408a5f
push 0x20
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.00416790
add esp, 8
test eax, eax
jne 0x408c5d
push 0x454abc
lea ecx, [ebp - 0x28]
call fcn.004021e0
lea ecx, [ebp - 0x38]
call fcn.00402270
push eax
lea ecx, [ebp - 0x28]
call fcn.004022b0
lea edx, [ebp - 0x28]
push edx
lea ecx, [ebp - 0x38]
call fcn.00402240
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
push eax
call fcn.0041d990
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x408b18
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
push eax
call fcn.0041d990
add esp, 4
and eax, 0x10
je 0x408b18
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
push eax
lea ecx, [ebp - 0x38]
call fcn.00402240
jmp 0x408bc8
push 2
push 0x454ae0
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
push eax
call fcn.00438fb4
add esp, 0xc
test eax, eax
jne 0x408bc8
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
add eax, 4
push eax
call fcn.0041d990
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x408b8f
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
add eax, 4
push eax
lea ecx, [ebp - 0x38]
call fcn.004021e0
jmp 0x408bc8
push 0x454ae8
lea ecx, [ebp - 0x28]
call fcn.004021e0
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 4
call fcn.00418b00
mov ecx, eax
call fcn.00402270
add eax, 4
push eax
lea ecx, [ebp - 0x28]
call fcn.004022b0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x38]
call fcn.00402240
lea ecx, [ebp - 0x38]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00402280
mov edx, dword [ebp - 0x6c]
or edx, 1
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
call fcn.004021c0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x38]
call fcn.004021c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x3c]
call fcn.004021c0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x10]
call fcn.004021c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
call fcn.004021c0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x14]
call fcn.004021c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.004021c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.004021c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004021c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.004021c0
mov eax, dword [ebp + 8]
jmp 0x408e8b
push 0x20
lea ecx, [ebp - 0x28]
call fcn.00402270
push eax
call fcn.00416770
add esp, 8
xor ecx, ecx
mov word [eax], cx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
call fcn.004021c0
jmp 0x4088cf
lea ecx, [ebp - 0x28]
call fcn.00402270
movzx edx, word [eax]
cmp edx, 0x5c
jne 0x408cf5
lea ecx, [ebp - 0x28]
call fcn.00402270
movzx eax, word [eax + 2]
cmp eax, 0x5c
je 0x408cf5
push 2
push 0x46f018
push 3
lea ecx, [ebp - 0x54]
push ecx
call fcn.00439a88
add esp, 0x10
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x5c]
push ecx
call fcn.004109f0
add esp, 0xc
mov dword [ebp - 0x78], eax
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x7c], edx
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402240
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x5c]
call fcn.004021c0
push ecx
mov ecx, esp
mov dword [ebp - 0x60], esp
lea edx, [ebp - 0x28]
push edx
call fcn.00402280
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x64]
push eax
call fcn.00407eb0
add esp, 8
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x88], ecx
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x88]
push edx
lea ecx, [ebp - 0x28]
call fcn.00402240
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x64]
call fcn.004021c0
lea ecx, [ebp - 0x28]
call fcn.00402270
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.00407670
add esp, 8
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], ecx
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x90]
push edx
lea ecx, [ebp - 0x38]
call fcn.00402240
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x68]
call fcn.004021c0
lea ecx, [ebp - 0x38]
call fcn.00402270
push eax
call fcn.00439a18
add esp, 4
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp + 8]
call fcn.00402280
mov ecx, dword [ebp - 0x6c]
or ecx, 1
mov dword [ebp - 0x6c], ecx
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x38]
call fcn.004021c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x3c]
call fcn.004021c0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x10]
call fcn.004021c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
call fcn.004021c0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x14]
call fcn.004021c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.004021c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.004021c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004021c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.004021c0
mov eax, dword [ebp + 8]
jmp 0x408e8b
push 0
mov ecx, dword [ebp + 8]
call fcn.00402190
mov edx, dword [ebp - 0x6c]
or edx, 1
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x10]
call fcn.004021c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
call fcn.004021c0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x14]
call fcn.004021c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.004021c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.004021c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004021c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.004021c0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x4c]
xor ecx, ebp
call fcn.004376f1
mov esp, ebp
pop ebp
ret