Function at 0x406fd0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f01ad
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x53ba20]
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 0x407043
mov esi, eax
nop
movzx eax, si
push eax
call fcn.004c8ee0
mov edx, dword [ebp - 0x10]
add esp, 4
test eax, eax
jne 0x40702d
movzx eax, word [edx]
mov ecx, eax
cmp ax, di
jne 0x407040
movzx eax, word [edx + 2]
add edx, 2
mov dword [ebp - 0x10], edx
mov esi, eax
mov ecx, eax
test ax, ax
jne 0x407010
mov esi, dword [ebp + 8]
test cx, cx
je 0x4073be
cmp cx, di
je 0x4073be
cmp cx, 0x22
jne 0x4070e6
movzx ecx, word [edx + 2]
add edx, 2
mov dword [ebp - 0x10], edx
mov esi, edx
mov eax, ecx
test cx, cx
je 0x407091
movzx eax, cx
cmp cx, 0x22
je 0x40708e
movzx eax, word [esi + 2]
add esi, 2
mov edx, eax
mov ecx, eax
mov dword [ebp - 0x18], edx
test ax, ax
jne 0x407072
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 0x407366
movzx eax, word [ecx]
mov edx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
test ax, ax
je 0x407366
movzx eax, ax
nop
cmp ax, di
je 0x407366
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 0x4070c0
jmp 0x407366
mov esi, edx
movzx eax, cx
mov dword [ebp - 0x14], esi
nop
test ax, ax
je 0x407114
movzx ecx, ax
cmp cx, di
je 0x407111
cmp cx, 0x20
je 0x407111
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x4070f8
mov dword [ebp - 0x14], esi
cmp byte [ebp + 0x14], 0
je 0x407361
movzx eax, word [edx]
cmp eax, 0x25
je 0x407136
cmp eax, 0x5c
je 0x407136
cmp word [edx + 2], 0x3a
jne 0x407361
mov eax, dword [ebp + 0x10]
push edx
mov edi, dword [eax]
call fcn.004c8c20
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.004c8c7f
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, 0x4fbd20
mov eax, dword [edx]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x20], edi
call fcn.004c8c7f
push edi
mov dword [ebp - 4], 0
call fcn.004c999c
add esp, 0x14
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0x100
jne 0x40720f
push 0x4fc494
push edi
call fcn.004c5729
add esp, 8
test eax, eax
je 0x40720f
push 0x4fc494
push edi
call fcn.004c5729
movups xmm0, xmmword [0x4fc29c]
mov edx, eax
add esp, 8
mov eax, dword [ebp + 0x10]
sub edx, edi
sar edx, 1
mov ecx, dword [eax]
movups xmmword [ecx + edx*2], xmm0
movq xmm0, qword [0x4fc2ac]
movq qword [ecx + edx*2 + 0x10], xmm0
mov eax, dword [0x4fc2b4]
mov dword [ecx + edx*2 + 0x18], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, 0x1c
lea ecx, [ecx + edx*2]
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
test ax, ax
jne 0x407200
mov eax, dword [ebp + 0x10]
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.00414b30
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, eax
mov ecx, dword [ecx]
mov dword [ebp - 0x18], ecx
mov ecx, 0x4fbd20
cmovne ecx, eax
push ecx
call fcn.004c8c20
mov ecx, dword [ebp + 0x10]
push dword [ebp - 0x18]
mov dword [ecx], eax
call fcn.004c8c7f
push dword [ebp - 0x1c]
call fcn.004c8c7f
mov eax, dword [ebp + 0x10]
push dword [eax]
call fcn.00414c30
add esp, 0x18
cmp eax, 0xffffffff
je 0x407266
test al, 0x10
je 0x407355
push 0x4fc5a0
call fcn.004c8c20
push 0
mov esi, eax
call fcn.004c8c7f
mov eax, dword [ebp + 0x10]
mov ecx, 0x4fbd20
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push 0
mov dword [ebp - 0x18], eax
call fcn.004c8c7f
add esp, 0x10
lea ecx, [ebp - 0x18]
push esi
call fcn.00405090
push esi
call fcn.004c8c7f
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18]
test ecx, ecx
mov esi, dword [eax]
mov eax, 0x4fbd20
cmovne eax, ecx
push eax
call fcn.004c8c20
mov ecx, dword [ebp + 0x10]
push esi
mov dword [ecx], eax
call fcn.004c8c7f
push dword [ebp - 0x18]
call fcn.004c8c7f
mov eax, dword [ebp + 0x10]
push dword [eax]
call fcn.00414c30
add esp, 0x14
cmp eax, 0xffffffff
je 0x4072eb
test al, 0x10
je 0x407352
mov esi, dword [ebp - 0x14]
mov ax, word [ebp + 0xc]
movzx ecx, word [esi]
cmp cx, ax
je 0x407326
nop word [eax + eax]
movzx eax, cx
push eax
call fcn.004c8ee0
add esp, 4
test eax, eax
je 0x40731f
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
cmp ax, word [ebp + 0xc]
jne 0x407300
mov ax, word [ebp + 0xc]
mov dword [ebp - 0x14], esi
movzx ecx, word [esi]
test cx, cx
je 0x4073a2
cmp cx, ax
je 0x4073a2
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
movzx eax, word [esi]
add esp, 4
mov di, word [ebp + 0xc]
mov edx, dword [ebp - 0x10]
jmp 0x4070f0
mov esi, dword [ebp - 0x14]
push edi
call fcn.004c8c7f
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.004c8c20
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.004c8c7f
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.004c8c7f
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