Function at 0x408f10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f04d1
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x53ba20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x54], eax
mov al, byte [ebp + 0x14]
mov dword [ebp - 0x68], esi
mov byte [ebp - 0x3d], al
mov byte [ebp - 0x68], al
mov dword [ebp - 0x78], 0
mov eax, dword [edx + 8]
mov ecx, dword [edx + 4]
sub eax, ecx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], edx
cmp eax, 4
jae 0x408f92
push 0x4fc4d8
mov dword [esi], 0
call fcn.004c8c20
push 0
mov dword [esi], eax
call fcn.004c8c7f
add esp, 8
mov eax, esi
jmp 0x409c1f
mov eax, dword [ecx]
mov esi, 0x4fbd20
test eax, eax
mov ecx, esi
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x60], eax
call fcn.004c8c7f
push 2
mov dword [ebp - 4], 0
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov word [eax], cx
push 2
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x2c], eax
mov word [eax], cx
push 2
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0x5c], eax
mov word [eax], cx
push 2
call fcn.004c8c9a
mov edi, eax
add esp, 0x18
xor eax, eax
mov dword [ebp - 0x48], edi
mov word [edi], ax
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
cmp eax, 0x200
jne 0x409014
mov eax, dword [0x540434]
jmp 0x40901c
mov eax, dword [0x540430]
mov dword [ebp - 0x48], edi
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
add esp, 4
mov edi, eax
mov dword [ebp - 0x58], edi
push dword [ebp - 0x48]
call fcn.004c8c7f
mov eax, dword [ebp - 0x38]
mov ecx, esi
mov eax, dword [eax + 4]
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x48], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x3c]
mov ecx, esi
test eax, eax
mov dword [ebp - 0x24], 0
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x24], eax
call fcn.004c8c7f
push dword [ebp - 0x24]
call fcn.004c999c
add esp, 0x18
cmp byte [ebp + 0x18], 0
je 0x409110
push 4
push 0x4fc4f4
push dword [ebp - 0x24]
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x4090ad
mov ecx, dword [ebp - 0x3c]
add ecx, 8
jmp 0x40911b
push 0xc
push 0x4fc500
push dword [ebp - 0x24]
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x409110
mov esi, dword [ebp - 0x1c]
push 0x53f750
call fcn.004c8c20
push esi
mov dword [ebp - 0x1c], eax
call fcn.004c8c7f
add esp, 8
lea ecx, [ebp - 0x1c]
push 0x4fbdfc
call fcn.00405090
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x1c]
add eax, 0x18
push eax
call fcn.00405090
mov eax, dword [ebp - 0x1c]
mov esi, 0x4fbd20
mov ecx, dword [ebp - 0x2c]
test eax, eax
mov dword [ebp - 0x2c], ecx
mov ecx, esi
cmovne ecx, eax
push ecx
jmp 0x409121
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
mov dword [ebp - 0x2c], eax
mov eax, esi
cmovne eax, ecx
push eax
call fcn.004c8c20
add esp, 4
mov dword [ebp - 0x30], eax
push dword [ebp - 0x2c]
call fcn.004c8c7f
mov ecx, dword [ebp - 0x30]
mov eax, esi
test ecx, ecx
cmovne eax, ecx
push eax
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x74], esi
call fcn.004c8c7f
push esi
mov byte [ebp - 4], 7
call fcn.004c999c
add esp, 0x10
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x4091d2
push 0x4fc494
push esi
call fcn.004c5729
add esp, 8
test eax, eax
je 0x4091d2
push 0x4fc494
push esi
call fcn.004c5729
mov edx, dword [ebp - 0x30]
mov ecx, eax
movups xmm0, xmmword [0x4fc29c]
sub ecx, esi
add esp, 8
sar ecx, 1
movups xmmword [edx + ecx*2], xmm0
movq xmm0, qword [0x4fc2ac]
movq qword [edx + ecx*2 + 0x10], xmm0
mov eax, dword [0x4fc2b4]
mov dword [edx + ecx*2 + 0x18], eax
add ecx, 0xe
lea ecx, [edx + ecx*2]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
test ax, ax
jne 0x4091c1
jmp 0x4091d5
mov edx, dword [ebp - 0x30]
push edx
lea eax, [ebp - 0x4c]
push eax
call fcn.00414b30
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
mov ecx, 0x4fbd20
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call fcn.004c8c7f
push dword [ebp - 0x4c]
call fcn.004c8c7f
push 2
call fcn.004c8c9a
mov edx, eax
add esp, 0x18
xor eax, eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x2c], edx
mov word [edx], ax
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 8
cmp word [ecx], ax
je 0x409a43
push 0x4fc520
call fcn.004c8c20
push 0
mov dword [ebp - 0x50], eax
call fcn.004c8c7f
add esp, 8
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 9
call fcn.00405090
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [ebp - 0x6c]
or eax, 0x20019
push ecx
push eax
push 0
push dword [ebp - 0x50]
push dword [0x534a0c]
call fcn.00408690
add esp, 0x14
test eax, eax
jne 0x40930f
lea eax, [ebp - 0x1c]
push eax
push 0
push dword [ebp - 0x6c]
call fcn.00415220
add esp, 0xc
push dword [ebp - 0x6c]
test eax, eax
jne 0x409309
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x1c]
push eax
call fcn.00404760
mov eax, dword [ebp - 0x50]
push eax
call fcn.004c8c7f
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004c8c7f
push esi
call fcn.004c8c7f
push dword [ebp - 0x24]
call fcn.004c8c7f
push dword [ebp - 0x3c]
call fcn.004c8c7f
push edi
call fcn.004c8c7f
push dword [ebp - 0x5c]
call fcn.004c8c7f
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.004c8c7f
push dword [ebp - 0x1c]
call fcn.004c8c7f
push dword [ebp - 0x60]
call fcn.004c8c7f
add esp, 0x28
jmp 0x409c1c
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x1c]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
mov ecx, dword [ebp - 0x20]
push ecx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x2c], eax
call fcn.004c8c7f
add esp, 8
cmp byte [ebp - 0x3d], 0
jne 0x409571
cmp byte [0x53ead6], 0
jne 0x409571
nop dword [eax + eax]
mov eax, dword [ebp - 0x1c]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x20], eax
call fcn.004c8c7f
push 0x4fc58c
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0xa
call fcn.004c5729
add esp, 0x10
test eax, eax
je 0x4093d8
push 0
push 0
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x4093d8
lea eax, [eax*2 + 2]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
call fcn.004c8ca5
add esp, 8
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4093c9
push dword [ebp - 0x28]
push 0
push eax
call fcn.004c52c0
mov eax, dword [ebp - 0x20]
add esp, 0xc
push 0
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp byte [0x53ead6], 0
jne 0x409822
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push edi
push dword [ebp - 0x54]
call fcn.00414d50
add esp, 0x10
test al, al
jne 0x40980a
push 0x2f
push dword [ebp - 0x20]
call fcn.004c55d8
add esp, 8
test eax, eax
jne 0x409822
mov edx, dword [ebp - 0x20]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x28], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409420
sub ecx, dword [ebp - 0x28]
sar ecx, 1
cmp ecx, 3
jbe 0x409822
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x28], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409441
sub ecx, dword [ebp - 0x28]
sar ecx, 1
cmp word [edx + ecx*2 - 8], 0x2e
je 0x409822
mov eax, dword [ebp - 0x24]
test edx, edx
mov dword [ebp - 0x28], eax
mov eax, 0x4fbd20
cmovne eax, edx
push eax
call fcn.004c8c20
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
call fcn.004c8c7f
add esp, 8
lea ecx, [ebp - 0x24]
push 0x4fc594
call fcn.00405090
cmp byte [0x53ead6], 0
jne 0x409566
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x54]
call fcn.00414d50
add esp, 0x10
test al, al
jne 0x409566
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
mov dword [ebp - 0x28], eax
mov eax, 0x4fbd20
cmovne eax, ecx
push eax
call fcn.004c8c20
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
call fcn.004c8c7f
add esp, 8
lea ecx, [ebp - 0x24]
push 0x4fc5a0
call fcn.00405090
cmp byte [0x53ead6], 0
jne 0x409566
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x54]
call fcn.00414d50
add esp, 0x10
test al, al
jne 0x409566
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
mov dword [ebp - 0x28], eax
mov eax, 0x4fbd20
cmovne eax, ecx
push eax
call fcn.004c8c20
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
call fcn.004c8c7f
add esp, 8
lea ecx, [ebp - 0x24]
push 0x4fc5ac
call fcn.00405090
cmp byte [0x53ead6], 0
jne 0x409822
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x54]
call fcn.00414d50
add esp, 0x10
test al, al
je 0x409822
push dword [ebp - 0x20]
call fcn.004c8c7f
add esp, 4
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5c
jne 0x4095ff
cmp word [ecx + 2], 0x5c
je 0x4095ff
push 2
push 0x53f750
lea eax, [ebp - 0x18]
push 3
push eax
call fcn.004c927f
lea eax, [ebp - 0x18]
push eax
call fcn.004c8c20
push 0
mov dword [ebp - 0x44], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x44]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x20], eax
call fcn.004c8c7f
add esp, 0x20
lea ecx, [ebp - 0x20]
push dword [ebp - 0x1c]
call fcn.00405090
mov eax, dword [ebp - 0x44]
push eax
call fcn.004c8c7f
add esp, 4
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x1c]
push eax
call fcn.00404de0
push dword [ebp - 0x20]
call fcn.004c8c7f
mov ecx, dword [ebp - 0x1c]
add esp, 4
test ecx, ecx
mov eax, 0x4fbd20
cmovne eax, ecx
push eax
call fcn.004c8c20
push 0
mov dword [ebp - 0x20], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x20]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x44], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x20]
add esp, 0x10
mov dword [ebp - 0x78], 2
cmp word [eax], 0
je 0x409788
cmp dword [0x540420], 0
je 0x409788
push 0x4fbdfc
call fcn.004c8c20
push 0
mov esi, eax
call fcn.004c8c7f
push 0x53f958
call fcn.004c8c20
push 0
mov dword [ebp - 0x64], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x64]
mov ecx, 0x4fbd20
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x28], eax
call fcn.004c8c7f
add esp, 0x18
lea ecx, [ebp - 0x28]
push esi
call fcn.00405090
mov eax, dword [ebp - 0x64]
push eax
call fcn.004c8c7f
push esi
mov byte [ebp - 4], 0xd
call fcn.004c8c7f
mov eax, dword [0x540420]
lea ecx, [ebp - 0x4c]
add esp, 8
push ecx
call eax
test eax, eax
je 0x40976e
cmp dword [ebp - 0x4c], 0
jne 0x40976e
mov ecx, 0x540010
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4096e5
mov esi, dword [ebp - 0x20]
sub ecx, edx
sar ecx, 1
push ecx
push 0x540010
push esi
call fcn.004c94d0
add esp, 0xc
test eax, eax
jne 0x40976e
mov ecx, 0x540010
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409712
sub ecx, edx
sar ecx, 1
push 0x540218
mov dword [ebp - 0x64], ecx
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x7c], esi
call fcn.004c8c7f
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx*2]
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404e70
add esp, 0x14
lea ecx, [ebp - 0x44]
push eax
call fcn.00404de0
push dword [ebp - 0x18]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
add esp, 8
push dword [ebp - 0x4c]
call dword [0x540424]
push dword [ebp - 0x28]
call fcn.004c8c7f
mov esi, dword [ebp - 0x74]
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
mov dword [ebp - 0x18], eax
mov eax, 0x4fbd20
cmovne eax, ecx
push eax
call fcn.004c8c20
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
call fcn.004c8c7f
push dword [ebp - 0x44]
mov byte [ebp - 4], 9
call fcn.004c8c7f
add esp, 0x10
cmp byte [0x53ead6], 0
jne 0x409a03
push dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.004073e0
mov ecx, 0x4fbd20
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push dword [ebp - 0x70]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], eax
call fcn.004c8c7f
push dword [ebp - 0x18]
call fcn.004c8c7f
add esp, 0x14
jmp 0x409a27
cmp byte [0x53ead6], 0
jne 0x409822
push dword [ebp - 0x24]
call fcn.00414c30
add esp, 4
test al, 0x10
je 0x409892
mov eax, dword [ebp - 0x1c]
mov ecx, eax
cmp word [eax], 0x20
jne 0x409839
nop dword [eax]
add ecx, 2
cmp word [ecx], 0x20
je 0x409830
cmp byte [0x53ead6], 0
jne 0x409854
push 0x20
push ecx
call fcn.004c55d8
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x1c]
je 0x4098c6
push 0x20
push eax
call fcn.004c5688
add esp, 8
test eax, eax
je 0x409875
push 0x20
push dword [ebp - 0x1c]
call fcn.004c5688
add esp, 8
xor ecx, ecx
mov word [eax], cx
push dword [ebp - 0x20]
call fcn.004c8c7f
add esp, 4
cmp byte [0x53ead6], 0
invalid
invalid