Function at 0x40ac40
Capabilities:
Get thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x45b810
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x473354]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x3c], ebx
mov edi, dword [esp + 0x54]
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0x10]
lea esi, [edi + 4]
mov dword [esp + 0x3c], esi
test eax, 0xfffffffc
jne 0x40acae
push str._bad_command_
call fcn.0042f484
mov ecx, dword [esp + 0x54]
mov dword [ecx], eax
add esp, 4
mov eax, ecx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
sar ecx, 2
test ecx, ecx
ja 0x40acc0
call fcn.004305db
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
push eax
call fcn.0042f484
mov dword [esp + 0x28], eax
push 1
mov dword [esp + 0x50], ebx
call fcn.0042f396
mov dword [esp + 0x5c], eax
mov byte [eax], 0
push 1
call fcn.0042f396
mov esi, eax
mov byte [esi], 0
push 1
call fcn.0042f396
mov dword [esp + 0x30], eax
mov byte [eax], 0
lea edx, [esp + 0x40]
push edi
push edx
call fcn.00406b40
mov ebp, dword [esp + 0x48]
push ebp
call fcn.0042f484
mov dword [esp + 0x30], eax
push eax
call fcn.00431191
mov eax, dword [esp + 0x34]
push 4
push 0x460e98
push eax
call fcn.0043280d
add esp, 0x2c
test eax, eax
jne 0x40ad38
lea eax, [ebp + 4]
push eax
jmp 0x40ad9a
mov ecx, dword [esp + 0x14]
push 0xc
push str.SYSTEMROOT_
push ecx
call fcn.0043280d
add esp, 0xc
test eax, eax
jne 0x40ad99
mov edi, dword [esp + 0x54]
push 0x474b68
call fcn.0042f484
push edi
mov dword [esp + 0x5c], eax
call fcn.0042f4d9
add esp, 8
push ebx
push SysReAllocString
push 0x460cb4
lea ecx, [esp + 0x60]
call fcn.00401250
push ebx
lea eax, [ebp + 0xc]
push SysReAllocString
push eax
lea ecx, [esp + 0x60]
call fcn.00401250
mov edx, dword [esp + 0x54]
push edx
jmp 0x40ad9a
push ebp
call fcn.0042f484
mov edi, eax
push esi
mov dword [esp + 0x34], edi
call fcn.0042f4d9
add esp, 8
push edi
call fcn.0042f484
mov esi, eax
mov dword [esp + 0x38], esi
push esi
mov byte [esp + 0x50], 6
call fcn.00431191
mov eax, dword [0x4746a8]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x40ae3a
push str._PROGRAMFILES_
push esi
call fcn.00430b10
add esp, 8
test eax, eax
je 0x40ae3a
push str._PROGRAMFILES_
push esi
call fcn.00430b10
mov ecx, dword [str._ProgramW6432_]
add esp, 8
sub eax, esi
mov dword [eax + edi], ecx
mov edx, dword [0x460618]
mov dword [eax + edi + 4], edx
mov ecx, dword [0x46061c]
mov dword [eax + edi + 8], ecx
mov dx, word [0x460620]
mov word [eax + edi + 0xc], dx
lea eax, [eax + edi + 0xe]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x40ae30
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.00416cc0
mov eax, dword [eax]
mov ebx, dword [esp + 0x5c]
push eax
call fcn.0042f484
push ebx
mov dword [esp + 0x64], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x68]
add esp, 0x14
cmp byte [edx], 0
je 0x40b2de
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths_
call fcn.0042f484
add esp, 4
mov dword [esp + 0x1c], eax
push 0
push SysReAllocString
push ebp
lea ecx, [esp + 0x28]
mov byte [esp + 0x54], 7
call fcn.00401250
mov ecx, dword [0x4746a8]
lea eax, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [esp + 0x20]
or eax, 0x20019
push eax
mov eax, dword [reloc.OLEAUT32.dll_SysReAllocString]
push 0
push edx
push eax
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x40af5a
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x54]
push ecx
push eax
push edx
call fcn.00416b30
add esp, 0xc
test eax, eax
jne 0x40af4f
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0042f484
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x54]
push edx
mov dword [ebx], eax
call fcn.0042f4d9
push esi
call fcn.0042f4d9
mov eax, dword [esp + 0x20]
push eax
call fcn.0042f4d9
push ebp
call fcn.0042f4d9
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0042f4d9
push edi
call fcn.0042f4d9
mov edx, dword [esp + 0x70]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x44]
push eax
call fcn.0042f4d9
add esp, 0x24
jmp 0x40b32b
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x54]
push edx
call fcn.0042f484
add esp, 4
mov dword [esp + 0x18], eax
cmp byte [esp + 0x58], 0
mov byte [esp + 0x48], 8
jne 0x40b10b
jmp 0x40af80
mov eax, dword [esp + 0x54]
push eax
call fcn.0042f484
mov esi, eax
mov dword [esp + 0x3c], esi
mov ecx, dword [esp + 0x58]
push 0x460e4c
push ecx
mov byte [esp + 0x54], 9
call fcn.00430b10
add esp, 0xc
test eax, eax
je 0x40aff1
mov edx, dword [esp + 0x54]
push 0
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebx, eax
test ebx, ebx
je 0x40aff1
lea ebp, [ebx + 1]
push ebp
push esi
call fcn.0042f567
push ebp
mov esi, eax
push 0
push esi
mov dword [esp + 0x4c], esi
call fcn.0042f790
mov eax, dword [esp + 0x68]
add esp, 0x14
push 0
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebp, dword [esp + 0x30]
mov edx, dword [0x474ef4]
lea ecx, [esp + 0x14]
push ecx
push esi
push edx
call fcn.00416d20
add esp, 0xc
test al, al
jne 0x40b0aa
mov ebx, dword [esp + 0x14]
push esi
call fcn.0042f484
push ebx
mov dword [esp + 0x1c], eax
call fcn.0042f4d9
add esp, 8
push 0
push SysReAllocString
push str..exe
lea ecx, [esp + 0x20]
call fcn.00401250
mov ecx, dword [esp + 0x14]
mov edx, dword [0x474ef4]
lea eax, [esp + 0x54]
push eax
push ecx
push edx
call fcn.00416d20
add esp, 0xc
push esi
test al, al
jne 0x40b0fe
mov ebx, dword [esp + 0x18]
call fcn.0042f484
push ebx
mov dword [esp + 0x1c], eax
call fcn.0042f4d9
add esp, 8
push 0
push SysReAllocString
push str..dll
lea ecx, [esp + 0x20]
call fcn.00401250
mov ecx, dword [esp + 0x14]
mov edx, dword [0x474ef4]
lea eax, [esp + 0x54]
push eax
push ecx
push edx
call fcn.00416d20
add esp, 0xc
test al, al
jne 0x40b1f4
jmp 0x40b0bf
mov eax, dword [esp + 0x14]
push eax
call fcn.00416f90
add esp, 4
test al, 0x10
je 0x40b1e6
mov eax, dword [esp + 0x54]
cmp byte [eax], 0x20
jne 0x40b0ce
inc eax
cmp byte [eax], 0x20
je 0x40b0c8
push 0x20
push eax
call fcn.00430610
add esp, 8
test eax, eax
je 0x40b1ff
mov ecx, dword [esp + 0x54]
push 0x20
push ecx
call fcn.004306d0
push esi
mov byte [eax], 0
call fcn.0042f4d9
add esp, 0xc
jmp 0x40af80
mov byte [esp + 0x4c], 8
call fcn.0042f4d9
add esp, 4
push ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x40], esp
mov esi, esp
push ecx
call fcn.0042f484
lea edx, [esp + 0x44]
add esp, 4
push edx
mov dword [esi], eax
call fcn.00406d90
mov eax, dword [eax]
mov esi, dword [esp + 0x5c]
push eax
call fcn.0042f484
push esi
mov dword [esp + 0x64], eax
call fcn.0042f4d9
mov eax, dword [esp + 0x4c]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x68]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.0040aa00
mov eax, dword [eax]
mov ebx, dword [esp + 0x34]
push eax
call fcn.0042f484
push ebx
mov esi, eax
call fcn.0042f4d9
mov eax, dword [esp + 0x60]
push eax
call fcn.0042f4d9
push esi
call fcn.0045aeec
push esi
call fcn.0042f484
mov ebx, dword [esp + 0x80]
push esi
mov dword [ebx], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x6c]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x50]
push eax
call fcn.0042f4d9
add esp, 0x40
push ebp
call fcn.0042f4d9
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0042f4d9
push edi
call fcn.0042f4d9
mov edx, dword [esp + 0x60]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x34]
push eax
call fcn.0042f4d9
add esp, 0x14
jmp 0x40b32b
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x58]
call fcn.00401690
mov byte [esp + 0x48], 8
push esi
jmp 0x40b103
mov ebx, dword [esp + 0x3c]
push 0
mov ecx, ebx
call fcn.00405d00
mov eax, dword [eax]
push eax
call fcn.00416f90
add esp, 4
cmp eax, 0xffffffff
je 0x40b240
push 0
mov ecx, ebx
call fcn.00405d00
mov eax, dword [eax]
push eax
call fcn.00416f90
add esp, 4
test al, 0x10
je 0x40b240
push 0
mov ecx, ebx
call fcn.00405d00
push eax
jmp 0x40b268
push str.File_not_found:
lea ecx, [esp + 0x58]
call fcn.00401200
mov eax, dword [esp + 0x18]
push 0
push SysReAllocString
push eax
lea ecx, [esp + 0x60]
call fcn.00401250
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401690
mov ebx, dword [esp + 0x50]
lea edx, [esp + 0x18]
push edx
mov ecx, ebx
call fcn.00401670
push esi
call fcn.0042f4d9
mov eax, dword [esp + 0x1c]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x40]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x24]
push eax
call fcn.0042f4d9
push ebp
call fcn.0042f4d9
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0042f4d9
push edi
call fcn.0042f4d9
mov edx, dword [esp + 0x74]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x48]
push eax
call fcn.0042f4d9
add esp, 0x28
jmp 0x40b32b
push 0x46043c
call fcn.0042f484
mov ebx, dword [esp + 0x54]
push esi
mov dword [ebx], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0042f4d9
push ebp
call fcn.0042f4d9
mov edx, dword [esp + 0x30]
push edx
call fcn.0042f4d9
push edi
call fcn.0042f4d9
mov eax, dword [esp + 0x6c]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0042f4d9
add esp, 0x20
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret