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

Disassembly:
push 0xffffffffffffffff
push 0x4aa2fa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x4e7ef0
mov dword [esp + 0x10], esi
call fcn.00446ce0
mov ecx, dword [eax + 4]
add eax, 4
inc ecx
mov dword [eax], ecx
mov ebx, dword [esp + 0x70]
xor ebp, ebp
cmp ebx, 3
mov dword [esp + 0x64], ebp
jne 0x44c312
mov dword [esi], 0x11
mov eax, dword [0x4e7ef0]
or ebx, 0xffffffff
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x64], ebx
je 0x44c810
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
cmp esi, ebp
jne 0x44c810
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
cmp eax, ebp
mov dword [esp + 0x64], 1
je 0x44c29d
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44c29f
xor esi, esi
mov eax, dword [0x4e7ef0]
push esi
push eax
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebp
jne 0x44c46e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x74]
push 0x4ca180
push ecx
mov dword [esp + 0x7c], eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov edi, eax
push 0x4e7ef8
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [edi + 4], edx
mov dword [0x4e7ef4], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x44c8f1
mov edi, dword [esp + 0x74]
cmp edi, ebp
jne 0x44c324
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, eax
mov ecx, dword [esp + 0x6c]
lea eax, [esp + 0x1c]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x2c]
imul edx, dword [esp + 0x2e]
mov dword [esp + 0x3c], eax
mov eax, 1
mov word [esp + 0x42], dx
mov cl, byte [esp + 0x42]
mov word [esp + 0x40], ax
mov dword [esp + 0x34], 0x28
shl eax, cl
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ebp
cmp eax, 0x100
jle 0x44c38d
xor eax, eax
cmp dx, 0x1f
jbe 0x44c395
xor eax, eax
shl eax, 2
push ebp
mov dword [esp + 0x1c], eax
lea esi, [eax + 0x28]
mov dword [esp + 0x18], esi
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
push ebp
push edi
mov edi, dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
call edi
push ebx
mov dword [esp + 0x78], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x44c4af
mov ecx, dword [esp + 0x74]
push eax
push ecx
push ebx
call edi
push ebx
push ebp
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword [esp + 0x10]
or ebx, 0xffffffff
xor esi, esi
mov dword [esp + 0x64], ebx
mov dword [edx], 1
mov eax, dword [0x4e7ef0]
cmp eax, ebx
je 0x44c810
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x44c810
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x64], 2
je 0x44c43e
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44c440
xor esi, esi
mov eax, dword [0x4e7ef0]
push esi
push eax
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c46e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x74]
push 0x4ca180
push ecx
mov dword [esp + 0x7c], eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov edi, eax
push 0x4e7ef8
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [edi + 4], edx
mov dword [0x4e7ef4], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x44c8f1
mov eax, dword [esp + 0x3c]
mov ecx, 0xa
lea esi, [esp + 0x34]
mov edi, ebp
push 0
push ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x74]
push 0
push eax
push 0
push ecx
push ebx
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x44c5c8
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edx, dword [esp + 0x74]
push 0
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x10]
or ebx, 0xffffffff
xor esi, esi
mov dword [esp + 0x64], ebx
mov dword [eax], 0x19
mov eax, dword [0x4e7ef0]
cmp eax, ebx
je 0x44c810
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x44c810
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x64], 3
je 0x44c553
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44c555
xor esi, esi
mov ecx, dword [0x4e7ef0]
push esi
push ecx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c7de
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x74]
push 0x4ca180
push edx
mov dword [esp + 0x7c], eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov edi, eax
push 0x4e7ef8
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [edi + 4], eax
mov dword [0x4e7ef4], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x44c8f1
mov ecx, 0xa
mov esi, ebp
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x3c]
test eax, eax
jne 0x44c60f
mov eax, dword [esp + 0x42]
mov ecx, dword [esp + 0x70]
and eax, 0xffff
imul eax, dword [esp + 0x38]
add eax, 0x1f
and al, 0xe0
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, edi
test ecx, ecx
je 0x44c60f
lea ecx, [eax + eax*2]
mov eax, ecx
shr eax, 1
mov edx, dword [esp + 0x14]
push 2
add eax, edx
push eax
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalReAlloc]
mov esi, eax
test esi, esi
jne 0x44c70e
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov eax, dword [esp + 0x74]
push esi
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
push esi
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [esp + 0x10]
or ebx, 0xffffffff
mov dword [esp + 0x64], ebx
mov dword [ecx], 1
mov eax, dword [0x4e7ef0]
cmp eax, ebx
je 0x44c810
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x44c810
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x64], 4
je 0x44c69c
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44c69e
xor esi, esi
mov edx, dword [0x4e7ef0]
push esi
push edx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c6cd
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x74]
push 0x4ca180
push eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov edi, eax
push 0x4e7ef8
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [edi + 4], ecx
mov dword [0x4e7ef4], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x44c8f1
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x6c]
push 0
push esi
lea eax, [esi + edx]
mov edx, dword [esp + 0x20]
add eax, edx
push eax
push edi
push 0
push ecx
push ebx
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x44c81e
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edx, dword [esp + 0x74]
push 0
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x10]
or ebx, 0xffffffff
xor esi, esi
mov dword [esp + 0x64], ebx
mov dword [eax], 0x19
mov eax, dword [0x4e7ef0]
cmp eax, ebx
je 0x44c810
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x44c810
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x64], 5
je 0x44c7ad
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44c7af
xor esi, esi
mov ecx, dword [0x4e7ef0]
push esi
push ecx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c7de
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x74]
push 0x4ca180
push edx
mov dword [esp + 0x7c], eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov edi, eax
push 0x4e7ef8
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [edi + 4], eax
mov dword [0x4e7ef4], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x44c8f1
mov ecx, dword [esp + 0x74]
push 0
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [0x4e7ef0]
or ebx, 0xffffffff
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x64], ebx
je 0x44c8e8
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x44c8e8
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x64], 6
je 0x44c884
mov ecx, eax
call fcn.00446ab0
mov edi, eax
jmp 0x44c886
xor edi, edi
mov edx, dword [0x4e7ef0]
push edi
push edx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c8b5
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x74]
push 0x4ca180
push eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov ebx, eax
push 0x4e7ef8
mov dword [ebx], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [ebx + 4], ecx
mov dword [0x4e7ef4], ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
mov eax, esi
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x58
ret 0xc