Function at 0x406c80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a7c30
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x4dc6e0]
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 esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], ebx
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 4]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x58], 0
test ecx, 0xfffffffc
jne 0x406ce8
push 0x4b0014
call fcn.0048faa4
mov dword [ebx], eax
add esp, 4
mov eax, ebx
jmp 0x4074c7
mov eax, dword [esi + 4]
push dword [eax]
call fcn.0048faa4
mov dword [ebp - 0x3c], eax
push 2
mov dword [ebp - 4], 0
call fcn.0048fb2f
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov word [eax], cx
push 2
call fcn.0048fb2f
mov edi, eax
xor eax, eax
mov dword [ebp - 0x18], edi
mov word [edi], ax
push 2
call fcn.0048fb2f
xor ecx, ecx
mov dword [ebp - 0x40], eax
mov word [eax], cx
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.004052f0
mov esi, dword [ebp - 0x4c]
push esi
call fcn.0048faa4
mov dword [ebp - 0x20], eax
push eax
call fcn.00491d2a
push 4
push 0x4b0030
push dword [ebp - 0x20]
call fcn.00491219
add esp, 0x2c
test eax, eax
jne 0x406d63
lea eax, [esi + 8]
push eax
jmp 0x406dc7
push 0xc
push 0x4b003c
push dword [ebp - 0x20]
call fcn.00491219
add esp, 0xc
test eax, eax
jne 0x406dc6
mov edi, dword [ebp - 0x1c]
push 0x4df110
call fcn.0048faa4
push edi
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
add esp, 8
lea ecx, [ebp - 0x1c]
push 0
push SysReAllocString
push 0x4afa48
call fcn.004021f0
push 0
push SysReAllocString
lea eax, [esi + 0x18]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004021f0
push dword [ebp - 0x1c]
call fcn.0048faa4
push dword [ebp - 0x18]
jmp 0x406dcd
push esi
call fcn.0048faa4
push edi
mov ebx, eax
mov dword [ebp - 0x50], ebx
call fcn.0048faf7
add esp, 8
push ebx
call fcn.0048faa4
mov edi, eax
mov dword [ebp - 0x54], edi
push edi
mov byte [ebp - 4], 6
call fcn.00491d2a
add esp, 8
push dword [0x4de020]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x406e70
push 0x4affd0
push edi
call fcn.004913b3
add esp, 8
test eax, eax
je 0x406e70
push 0x4affd0
push edi
call fcn.004913b3
movdqu xmm0, xmmword [0x4afe64]
mov ecx, eax
add esp, 8
sub ecx, edi
sar ecx, 1
movdqu xmmword [ebx + ecx*2], xmm0
movq xmm0, qword [0x4afe74]
movq qword [ebx + ecx*2 + 0x10], xmm0
mov eax, dword [0x4afe7c]
mov dword [ebx + ecx*2 + 0x18], eax
add ecx, 0xe
lea ecx, [ebx + ecx*2]
mov edx, ecx
sub edx, ecx
lea esp, [esp]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x406e60
lea eax, [ebp - 0x30]
push ebx
push eax
call fcn.00410090
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
push dword [eax]
call fcn.0048faa4
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
push dword [ebp - 0x30]
call fcn.0048faf7
mov eax, dword [ebp - 0x1c]
add esp, 0x14
cmp word [eax], 0
je 0x407480
push 0x4b0058
call fcn.0048faa4
add esp, 4
mov dword [ebp - 0x38], eax
push 0
push SysReAllocString
push esi
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 7
call fcn.004021f0
lea eax, [ebp - 0x48]
push eax
push dword [0x4de020]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push dword [ebp - 0x38]
push dword [section..data]
call fcn.00406320
add esp, 0x14
test eax, eax
jne 0x406f6f
lea eax, [ebp - 0x1c]
push eax
push 0
push dword [ebp - 0x48]
call fcn.00410690
add esp, 0xc
push dword [ebp - 0x48]
test eax, eax
jne 0x406f69
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x1c]
call fcn.0048faa4
mov ecx, dword [ebp - 0x28]
mov dword [ecx], eax
mov eax, dword [ebp - 0x38]
push eax
call fcn.0048faf7
push edi
call fcn.0048faf7
push dword [ebp - 0x20]
call fcn.0048faf7
push esi
call fcn.0048faf7
push dword [ebp - 0x40]
call fcn.0048faf7
push ebx
call fcn.0048faf7
push dword [ebp - 0x1c]
call fcn.0048faf7
push dword [ebp - 0x3c]
call fcn.0048faf7
add esp, 0x24
jmp 0x4074c4
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x1c]
call fcn.0048faa4
add esp, 4
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
cmp byte [ebp + 0x14], 0
mov byte [ebp - 4], 8
jne 0x407149
cmp byte [0x4de6bc], 0
jne 0x407149
jmp 0x406fa0
push dword [ebp - 0x1c]
call fcn.0048faa4
mov esi, eax
mov dword [ebp - 0x24], esi
push 0x4b00c4
push dword [ebp - 0x1c]
mov byte [ebp - 4], 9
call fcn.004913b3
add esp, 0xc
test eax, eax
je 0x407013
push 0
push 0
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x407013
lea eax, [eax*2 + 2]
push eax
push esi
call fcn.0048fbc1
mov ecx, dword [ebp - 0x18]
mov esi, eax
mov dword [ebp - 0x24], esi
lea eax, [ecx*2 + 2]
push eax
push 0
push esi
call fcn.004906c0
add esp, 0x14
push 0
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp byte [0x4de6bc], 0
jne 0x407224
lea eax, [ebp - 0x20]
push eax
push esi
push dword [0x4df738]
push dword [ebp - 0x44]
call fcn.00410280
add esp, 0x10
test al, al
jne 0x40720c
push 0x2f
push esi
call fcn.0049110f
add esp, 8
test eax, eax
jne 0x407224
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407056
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x407224
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407073
sub ecx, edx
sar ecx, 1
cmp word [esi + ecx*2 - 8], 0x2e
je 0x407224
mov eax, dword [ebp - 0x20]
push esi
mov dword [ebp - 0x18], eax
call fcn.0048faa4
push dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
call fcn.0048faf7
add esp, 8
lea ecx, [ebp - 0x20]
push 0
push SysReAllocString
push 0x4b00cc
call fcn.004021f0
cmp byte [0x4de6bc], 0
jne 0x40713c
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push dword [0x4df738]
push dword [ebp - 0x44]
call fcn.00410280
add esp, 0x10
test al, al
jne 0x40713c
mov eax, dword [ebp - 0x20]
push esi
mov dword [ebp - 0x18], eax
call fcn.0048faa4
push dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
call fcn.0048faf7
add esp, 8
lea ecx, [ebp - 0x20]
push 0
push SysReAllocString
push 0x4b00d8
call fcn.004021f0
cmp byte [0x4de6bc], 0
jne 0x407224
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push dword [0x4df738]
push dword [ebp - 0x44]
call fcn.00410280
add esp, 0x10
test al, al
je 0x407224
push esi
mov byte [ebp - 4], 8
call fcn.0048faf7
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp word [eax], 0x5c
jne 0x40719d
cmp word [eax + 2], 0x5c
je 0x40719d
push 2
push 0x4df110
lea eax, [ebp - 0x18]
push 3
push eax
call fcn.0049124f
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00417070
mov esi, dword [ebp - 0x1c]
push dword [eax]
call fcn.0048faa4
push esi
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
push dword [ebp - 0x24]
call fcn.0048faf7
mov eax, dword [ebp - 0x1c]
add esp, 0x28
push ecx
mov esi, esp
push eax
call fcn.0048faa4
add esp, 4
mov dword [esi], eax
lea eax, [ebp - 0x24]
push eax
call fcn.004059f0
mov esi, dword [ebp - 0x1c]
push dword [eax]
call fcn.0048faa4
push esi
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
push dword [ebp - 0x24]
call fcn.0048faf7
add esp, 0x14
cmp byte [0x4de6bc], 0
push dword [ebp - 0x1c]
jne 0x40744b
lea eax, [ebp - 0x24]
push eax
call fcn.004050a0
push dword [eax]
call fcn.0048faa4
push dword [ebp - 0x30]
mov esi, eax
call fcn.0048faf7
push dword [ebp - 0x24]
call fcn.0048faf7
add esp, 0x14
jmp 0x40745d
cmp byte [0x4de6bc], 0
jne 0x407224
push dword [ebp - 0x20]
call fcn.00410170
add esp, 4
test al, 0x10
je 0x407294
mov eax, dword [ebp - 0x1c]
mov ecx, eax
cmp word [eax], 0x20
jne 0x407239
nop
add ecx, 2
cmp word [ecx], 0x20
je 0x407230
cmp byte [0x4de6bc], 0
jne 0x407254
push 0x20
push ecx
call fcn.0049110f
add esp, 8
test eax, eax
je 0x4072bf
mov eax, dword [ebp - 0x1c]
push 0x20
push eax
call fcn.0049130d
add esp, 8
test eax, eax
je 0x407275
push 0x20
push dword [ebp - 0x1c]
call fcn.0049130d
add esp, 8
xor ecx, ecx
mov word [eax], cx
push esi
mov byte [ebp - 4], 8
call fcn.0048faf7
add esp, 4
cmp byte [0x4de6bc], 0
je 0x406fa0
jmp 0x407149
mov eax, dword [ebp - 0x1c]
push dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
call fcn.0048faa4
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
push esi
mov byte [ebp - 4], 8
call fcn.0048faf7
add esp, 0xc
jmp 0x407149
mov edi, dword [ebp - 0x1c]
push 0x4afff0
call fcn.0048faa4
push edi
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
add esp, 8
lea ecx, [ebp - 0x1c]
push 0
push SysReAllocString
push dword [ebp - 0x30]
call fcn.004021f0
push dword [ebp - 0x1c]
call fcn.0048faa4
push dword [ebp - 0x30]
mov edi, eax
mov dword [ebp - 0x34], edi
call fcn.0048faf7
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
push dword [eax]
call fcn.00410170
add esp, 0xc
cmp eax, 0xffffffff
je 0x40733e
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
push dword [eax]
call fcn.00410170
add esp, 4
test al, 0x10
je 0x40733e
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x34]
push dword [eax + 4]
call fcn.00402190
mov edi, dword [ebp - 0x34]
jmp 0x4073ed
cmp byte [0x4de6bc], 0
jne 0x4073ed
mov eax, dword [ebp - 0x2c]
push 2
push 0x4b00e4
mov eax, dword [eax + 4]
push dword [eax]
call fcn.00491219
add esp, 0xc
test eax, eax
jne 0x4073ed
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
mov eax, dword [eax]
add eax, 4
push eax
call fcn.00410170
add esp, 4
cmp eax, 0xffffffff
je 0x40739c
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x34]
mov eax, dword [eax + 4]
mov eax, dword [eax]
add eax, 4
push eax
call fcn.004021c0
mov edi, dword [ebp - 0x34]
jmp 0x4073ed
mov eax, dword [ebp - 0x1c]
push 0x4afff0
mov dword [ebp - 0x24], eax
call fcn.0048faa4
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
call fcn.0048faf7
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
add esp, 8
mov eax, dword [eax + 4]
push 0
push SysReAllocString
mov eax, dword [eax]
add eax, 4
push eax
call fcn.004021f0
push dword [ebp - 0x1c]
mov dword [ebp - 0x24], edi
call fcn.0048faa4
push dword [ebp - 0x24]
mov edi, eax
call fcn.0048faf7
add esp, 8
push edi
call fcn.0048faa4
mov ecx, dword [ebp - 0x28]
push esi
mov dword [ecx], eax
call fcn.0048faf7
push edi
call fcn.0048faf7
mov eax, dword [ebp - 0x38]
push eax
call fcn.0048faf7
push dword [ebp - 0x54]
call fcn.0048faf7
push dword [ebp - 0x20]
call fcn.0048faf7
push dword [ebp - 0x4c]
call fcn.0048faf7
push dword [ebp - 0x40]
call fcn.0048faf7
push ebx
call fcn.0048faf7
push dword [ebp - 0x1c]
call fcn.0048faf7
push dword [ebp - 0x3c]
call fcn.0048faf7
add esp, 0x2c
jmp 0x4074c4
call fcn.0048faa4
push dword [ebp - 0x30]
mov esi, eax
call fcn.0048faf7
add esp, 8
push esi
call fcn.00491afd
push esi
call fcn.0048faa4
mov ecx, dword [ebp - 0x28]
push esi
mov dword [ecx], eax
call fcn.0048faf7
mov eax, dword [ebp - 0x38]
push eax
call fcn.0048faf7
push edi
jmp 0x407410
push 0x4af9b8
call fcn.0048faa4
mov ecx, dword [ebp - 0x28]
push edi
mov dword [ecx], eax
call fcn.0048faf7
push dword [ebp - 0x20]
call fcn.0048faf7
push esi
call fcn.0048faf7
push dword [ebp - 0x40]
call fcn.0048faf7
push ebx
call fcn.0048faf7
push dword [ebp - 0x1c]
call fcn.0048faf7
push dword [ebp - 0x3c]
call fcn.0048faf7
add esp, 0x20
mov eax, dword [ebp - 0x28]
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.0048fc6c
mov esp, ebp
pop ebp
ret