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

Disassembly:
push 0xffffffffffffffff
push 0x4aa2a4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
mov ebx, ecx
push ebp
push esi
mov dword [ebx], 0
mov eax, dword [0x4e7ef0]
xor esi, esi
cmp eax, 0xffffffff
push edi
je 0x44beb2
mov ebp, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push eax
call ebp
mov esi, eax
test esi, esi
jne 0x44beb8
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x1c], esi
je 0x44be49
mov ecx, eax
call fcn.00446ab0
mov esi, eax
jmp 0x44be4b
xor esi, esi
mov eax, dword [0x4e7ef0]
push esi
push eax
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44be7d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x10]
push 0x4ca180
push ecx
mov dword [esp + 0x18], 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]
jmp 0x44beb8
mov ebp, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
inc dword [esi + 4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x26
mov dword [eax], 0
push edi
mov dword [esp + 0x24], 1
mov dword [ecx], 0
call esi
and eax, 0x80
cmp al, 0x80
je 0x44bfba
mov dword [ebx], 0x1a
mov eax, dword [0x4e7ef0]
or esi, 0xffffffff
xor edi, edi
cmp eax, esi
mov dword [esp + 0x1c], esi
je 0x44c075
push eax
call ebp
mov edi, eax
test edi, edi
jne 0x44c075
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
mov dword [esp + 0x1c], 2
je 0x44bf44
mov ecx, eax
call fcn.00446ab0
mov edi, eax
jmp 0x44bf46
xor edi, edi
mov edx, dword [0x4e7ef0]
push edi
push edx
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c042
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push 0x4ca180
push eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov esi, eax
push 0x4e7ef8
mov dword [esi], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [esi + 4], ecx
mov dword [0x4e7ef4], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
xor eax, eax
jmp 0x44c1e3
test edi, edi
jne 0x44c083
mov dword [ebx], 5
mov eax, dword [0x4e7ef0]
or esi, 0xffffffff
cmp eax, esi
mov dword [esp + 0x1c], esi
je 0x44c075
push eax
call ebp
mov edi, eax
test edi, edi
jne 0x44c075
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
mov dword [esp + 0x1c], 3
je 0x44c011
mov ecx, eax
call fcn.00446ab0
mov edi, eax
jmp 0x44c013
xor edi, edi
mov edx, dword [0x4e7ef0]
push edi
push edx
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c042
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push 0x4ca180
push eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov esi, eax
push 0x4e7ef8
mov dword [esi], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [esi + 4], ecx
mov dword [0x4e7ef4], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
xor eax, eax
jmp 0x44c1e3
push 0x26
push edi
xor ebp, ebp
call esi
test ah, 1
je 0x44c0d2
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x44c0d2
push 0x408
call fcn.0049c3ad
mov esi, eax
add esp, 4
lea edx, [esi + 4]
mov word [esi], 0x300
push edx
push 0xff
push ebp
push edi
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
push esi
mov word [esi + 2], ax
call dword [sym.imp.GDI32.dll_CreatePalette]
push esi
mov ebp, eax
call fcn.0049c3d6
add esp, 4
mov ecx, dword [esp + 0x34]
mov eax, ebp
test ecx, ecx
je 0x44c0de
mov eax, ecx
push eax
mov eax, dword [esp + 0x28]
push 0
push eax
mov ecx, ebx
call fcn.0044c200
mov esi, eax
xor edi, edi
cmp esi, edi
mov dword [esp + 0x34], edi
je 0x44c11d
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
push esi
mov ecx, ebx
call fcn.0044c910
push esi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
cmp ebp, edi
je 0x44c128
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [0x4e7ef0]
or esi, 0xffffffff
cmp eax, esi
mov dword [esp + 0x1c], esi
je 0x44c1d8
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x44c1d8
push 0xb8
call fcn.0049c3ad
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
mov dword [esp + 0x1c], 4
je 0x44c175
mov ecx, eax
call fcn.00446ab0
mov edi, eax
jmp 0x44c177
xor edi, edi
mov eax, dword [0x4e7ef0]
push edi
push eax
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x44c1a5
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x2c]
push 0x4ca180
push ecx
mov dword [esp + 0x34], eax
call fcn.00483664
push 8
call fcn.0049c3ad
add esp, 4
mov esi, eax
push 0x4e7ef8
mov dword [esi], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4e7ef4]
push 0x4e7ef8
mov dword [esi + 4], edx
mov dword [0x4e7ef4], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x10
ret 0x14