Function at 0x407000
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ee74d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x535a40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov di, word [ebp + 0xc]
mov edx, dword [esi]
mov dword [ebp - 0x10], edx
movzx eax, word [edx]
mov ecx, eax
test ax, ax
je 0x407073
mov esi, eax
nop
movzx eax, si
push eax
call fcn.004c8fc0
mov edx, dword [ebp - 0x10]
add esp, 4
test eax, eax
jne 0x40705d
movzx eax, word [edx]
mov ecx, eax
cmp ax, di
jne 0x407070
movzx eax, word [edx + 2]
add edx, 2
mov dword [ebp - 0x10], edx
mov esi, eax
mov ecx, eax
test ax, ax
jne 0x407040
mov esi, dword [ebp + 8]
test cx, cx
je 0x4073eb
cmp cx, di
je 0x4073eb
cmp cx, 0x22
jne 0x407116
movzx ecx, word [edx + 2]
add edx, 2
mov dword [ebp - 0x10], edx
mov esi, edx
mov eax, ecx
test cx, cx
je 0x4070c1
movzx eax, cx
cmp cx, 0x22
je 0x4070be
movzx eax, word [esi + 2]
add esi, 2
mov edx, eax
mov ecx, eax
mov dword [ebp - 0x18], edx
test ax, ax
jne 0x4070a2
mov edx, dword [ebp - 0x10]
test ax, ax
lea ecx, [esi + 2]
mov eax, dword [ebp + 8]
cmove ecx, esi
mov dword [eax], ecx
test di, di
je 0x407393
movzx eax, word [ecx]
mov edx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
test ax, ax
je 0x407393
movzx eax, ax
nop
cmp ax, di
je 0x407393
mov eax, dword [ebp + 8]
add ecx, 2
mov dword [eax], ecx
movzx eax, word [ecx]
mov edx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
test ax, ax
jne 0x4070f0
jmp 0x407393
mov esi, edx
mov dword [ebp - 0x14], esi
nop dword [eax + eax]
movzx eax, word [esi]
test ax, ax
je 0x40714c
mov ecx, eax
nop word [eax + eax]
cmp cx, di
je 0x407149
cmp cx, 0x20
je 0x407149
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x407130
mov dword [ebp - 0x14], esi
cmp byte [ebp + 0x14], 0
je 0x40738e
movzx eax, word [edx]
cmp eax, 0x25
je 0x40716e
cmp eax, 0x5c
je 0x40716e
cmp word [edx + 2], 0x3a
jne 0x40738e
mov eax, dword [ebp + 0x10]
push edx
mov edi, dword [eax]
call fcn.004c8d00
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.004c8d5f
mov edx, dword [ebp + 0x10]
mov ecx, esi
sub ecx, dword [ebp - 0x10]
xor edi, edi
sar ecx, 1
mov eax, dword [edx]
mov word [eax + ecx*2], di
mov ecx, 0x4f9d20
mov eax, dword [edx]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8d00
mov edi, eax
push 0
mov dword [ebp - 0x20], edi
call fcn.004c8d5f
push edi
mov dword [ebp - 4], 0
call fcn.004c9a7c
add esp, 0x14
push dword [0x539fd0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x40723f
push 0x4fa494
push edi
call fcn.004c580a
add esp, 8
test eax, eax
je 0x40723f
push 0x4fa494
push edi
call fcn.004c580a
movups xmm0, xmmword [0x4fa29c]
sub eax, edi
add esp, 8
sar eax, 1
lea edx, [eax + eax]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
movups xmmword [ecx + edx], xmm0
movq xmm0, qword [0x4fa2ac]
movq qword [ecx + edx + 0x10], xmm0
mov eax, dword [0x4fa2b4]
mov dword [ecx + edx + 0x18], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, 0x1c
add ecx, edx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
test ax, ax
jne 0x407230
mov eax, dword [ebp + 0x10]
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.00414b20
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, eax
mov ecx, dword [ecx]
mov dword [ebp - 0x18], ecx
mov ecx, 0x4f9d20
cmovne ecx, eax
push ecx
call fcn.004c8d00
mov ecx, dword [ebp + 0x10]
push dword [ebp - 0x18]
mov dword [ecx], eax
call fcn.004c8d5f
push dword [ebp - 0x1c]
call fcn.004c8d5f
mov eax, dword [ebp + 0x10]
push dword [eax]
call fcn.00414c20
add esp, 0x18
cmp eax, 0xffffffff
je 0x407296
test al, 0x10
je 0x407382
push 0x4fa5a0
call fcn.004c8d00
push 0
mov esi, eax
call fcn.004c8d5f
mov eax, dword [ebp + 0x10]
mov ecx, 0x4f9d20
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8d00
push 0
mov dword [ebp - 0x18], eax
call fcn.004c8d5f
add esp, 0x10
lea ecx, [ebp - 0x18]
push esi
call fcn.004050e0
push esi
call fcn.004c8d5f
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18]
test ecx, ecx
mov esi, dword [eax]
mov eax, 0x4f9d20
cmovne eax, ecx
push eax
call fcn.004c8d00
mov ecx, dword [ebp + 0x10]
push esi
mov dword [ecx], eax
call fcn.004c8d5f
push dword [ebp - 0x18]
call fcn.004c8d5f
mov eax, dword [ebp + 0x10]
push dword [eax]
call fcn.00414c20
add esp, 0x14
cmp eax, 0xffffffff
je 0x40731b
test al, 0x10
je 0x40737f
mov esi, dword [ebp - 0x14]
mov ax, word [ebp + 0xc]
movzx ecx, word [esi]
cmp cx, ax
je 0x407356
nop word [eax + eax]
movzx eax, cx
push eax
call fcn.004c8fc0
add esp, 4
test eax, eax
je 0x40734f
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
cmp ax, word [ebp + 0xc]
jne 0x407330
mov ax, word [ebp + 0xc]
mov dword [ebp - 0x14], esi
movzx ecx, word [esi]
test cx, cx
je 0x4073cf
cmp cx, ax
je 0x4073cf
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8d5f
mov di, word [ebp + 0xc]
add esp, 4
mov edx, dword [ebp - 0x10]
jmp 0x407120
mov esi, dword [ebp - 0x14]
push edi
call fcn.004c8d5f
mov edx, dword [ebp - 0x10]
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
push edx
mov edi, dword [eax]
call fcn.004c8d00
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.004c8d5f
mov eax, dword [ebp + 0x10]
add esp, 8
sub esi, dword [ebp - 0x10]
sar esi, 1
xor ecx, ecx
mov eax, dword [eax]
mov word [eax + esi*2], cx
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call fcn.004c8d5f
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi], edx
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret