Function at 0x422670
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
push ebx
push esi
push edi
push dword [0x454abc]
mov ebx, ecx
mov dword [ebp - 0x138], 0
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x138]
push eax
push dword [0x454abc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4226d1
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
sub esp, 8
lea edx, [ebp - 0x2c8]
call fcn.00422560
push 0
push 0
push 0x1004
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [0x454e8c]
mov esi, 0x100
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], esi
lea ecx, [esi + 0xa]
call fcn.00411890
mov edi, eax
xor eax, eax
lea ecx, [edi + 8]
mov dword [ebp - 4], edi
mov dword [edi + 4], ecx
mov word [ecx + 0x100], ax
xor ecx, ecx
mov dword [edi], eax
mov eax, dword [edi + 4]
mov word [eax], cx
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x18], eax
jbe 0x422896
lea ebx, [ebx]
push 2
push eax
push 0x102c
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test al, 2
je 0x422886
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
jbe 0x422804
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push ebx
call fcn.004225d0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
test esi, esi
je 0x4227b2
mov edx, dword [edi]
add edx, esi
cmp dword [ebp - 8], edx
jae 0x422791
lea ecx, [ebp - 8]
call fcn.00413020
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x4227a5
mov eax, dword [edi + 4]
add eax, dword [edi]
push esi
push ecx
push eax
call fcn.00441e40
add esp, 0xc
add dword [edi], esi
xor edx, edx
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov word [ecx + eax], dx
mov ecx, 0x44bd8c
call fcn.00411ec0
mov esi, eax
add esi, esi
je 0x4227f7
mov edx, dword [edi]
add edx, esi
cmp dword [ebp - 8], edx
jae 0x4227d6
lea ecx, [ebp - 8]
call fcn.00413020
mov edi, dword [ebp - 4]
mov eax, dword [edi]
add eax, dword [edi + 4]
push esi
push 0x44bd8c
push eax
call fcn.00441e40
add dword [edi], esi
add esp, 0xc
mov ecx, dword [edi]
xor edx, edx
mov eax, dword [edi + 4]
mov word [ecx + eax], dx
inc ebx
cmp ebx, dword [ebp - 0x14]
jb 0x422762
mov esi, dword [ebp - 8]
mov ebx, dword [edi]
test ebx, ebx
je 0x42283c
mov ecx, dword [edi + 4]
mov eax, ebx
shr eax, 1
lea edx, [eax*2 - 4]
sub ebx, edx
lea eax, [ecx + eax*2]
sub ebx, 4
push ebx
push eax
lea eax, [ecx + edx]
push eax
call fcn.0042aab0
add dword [edi], 0xfffffffc
add esp, 0xc
mov ecx, dword [edi]
xor edx, edx
mov eax, dword [edi + 4]
mov word [ecx + eax], dx
mov ecx, 0x44d42c
call fcn.00411ec0
mov ebx, eax
add ebx, ebx
je 0x422883
mov edx, dword [edi]
add edx, ebx
cmp esi, edx
jae 0x422862
lea ecx, [ebp - 8]
call fcn.00413020
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [edi]
add eax, dword [edi + 4]
push ebx
push 0x44d42c
push eax
call fcn.00441e40
add dword [edi], ebx
add esp, 0xc
mov ecx, dword [edi]
xor edx, edx
mov eax, dword [edi + 4]
mov word [ecx + eax], dx
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x18]
jb 0x422740
lea ecx, [ebp - 0x138]
call fcn.00411a70
push dword [0x454abc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [ebp - 0x138]
cmp eax, ecx
je 0x4228c2
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
push dword [ebp - 0x28]
push dword [0x454abc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4228e0
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4228f6
push eax
push 0
push dword [0x454e50]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret