Function at 0x4144dc
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov edi, eax
call fcn.0040677b
movzx eax, ax
mov dword [ebp - 0xc], eax
test al, 1
je 0x414503
mov al, 1
jmp 0x414827
xor ebx, ebx
cmp ax, bx
jne 0x414514
mov dword [ebp - 0xc], 2
mov eax, dword [ebp - 0xc]
cmp byte [ebp + 0x10], bl
je 0x414528
test al, 2
je 0x414528
and eax, 0xfffd
or eax, 8
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xa0]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xa0], 0x3c
call dword [sym.imp.USER32.dll_GetWindowInfo]
test eax, eax
jne 0x414559
xor al, al
jmp 0x414827
mov esi, dword [sym.imp.USER32.dll_IntersectRect]
push edi
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x3c]
push eax
call esi
test eax, eax
setne dl
mov byte [ebp - 6], dl
cmp dl, bl
je 0x41459c
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x98]
cmp eax, ecx
jge 0x41458b
sub eax, ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x9c]
cmp eax, ecx
jge 0x41459c
sub eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
and eax, 2
mov dword [ebp - 0x44], eax
je 0x4145f3
test dword [ebp - 0x7c], 0x20000000
je 0x4145b5
mov byte [ebp + 0x13], bl
jmp 0x4145f6
push edi
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x2c]
push eax
call esi
test eax, eax
setne byte [ebp + 0x13]
cmp byte [ebp + 0x13], bl
je 0x4145f6
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x88]
cmp eax, ecx
jge 0x4145e0
sub eax, ecx
mov dword [ebp - 0x1c], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x8c]
cmp eax, ecx
jge 0x4145f6
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x4145f6
mov byte [ebp + 0x13], dl
cmp byte [ebp - 6], bl
jne 0x414604
cmp byte [ebp + 0x13], bl
je 0x4144fc
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
cmp edi, ebx
je 0x414552
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push edi
push ebx
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp esi, ebx
je 0x414552
mov edi, dword [ebp + 8]
push dword [edi + 0x1c]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x40], eax
cmp eax, ebx
jne 0x41464e
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x414552
mov byte [ebp - 5], 1
cmp word [ebp - 0x44], bx
je 0x4147cd
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x64]
push eax
push dword [0x4233f4]
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp byte [ebp - 6], 1
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
jne 0x41471d
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x41471d
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], ebx
jne 0x4146c6
cmp dword [ebp - 0x10], ebx
je 0x4146d4
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
mov eax, dword [ebp + 8]
push ebx
lea ecx, [ebp - 0x3c]
call fcn.004143fa
push ebx
push 1
push 0x85
push dword [ebp + 0xc]
mov byte [ebp - 0x64], bl
call edi
cmp byte [ebp - 0x64], bl
jne 0x414706
push 2
push esi
push 0x317
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_DefWindowProcW]
mov eax, dword [ebp + 8]
push 1
lea ecx, [ebp - 0x3c]
call fcn.004143fa
push dword [ebp - 0xc]
push esi
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp byte [ebp + 0x13], 1
jne 0x4147be
cmp dword [ebp - 0x18], ebx
jne 0x414734
mov byte [ebp + 0x13], bl
cmp dword [ebp - 0x1c], ebx
je 0x414738
mov byte [ebp + 0x13], 1
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0xc], eax
cmp byte [ebp + 0x13], bl
je 0x414755
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
mov eax, dword [ebp + 8]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.004143fa
push ebx
push esi
push 0x14
push dword [ebp + 0xc]
call edi
push dword [ebp - 0xc]
neg eax
sbb eax, eax
inc eax
push esi
mov dword [ebp - 0x48], eax
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp byte [ebp + 0x13], bl
je 0x41478f
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push ebx
push ebx
push 0xf
push dword [ebp + 0xc]
mov byte [ebp - 0x64], bl
call edi
cmp byte [ebp - 0x64], bl
jne 0x4147b1
push 4
push esi
push 0x317
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_DefWindowProcW]
mov eax, dword [ebp + 8]
push 1
lea ecx, [ebp - 0x2c]
call fcn.004143fa
push ebx
push dword [0x4233f4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x414813
test byte [ebp - 0xc], 4
je 0x41482e
cmp dword [ebp - 0x14], ebx
jne 0x4147dd
cmp dword [ebp - 0x10], ebx
je 0x4147eb
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push ebx
lea ecx, [ebp - 0x3c]
mov eax, edi
call fcn.004143fa
push 0xe
push esi
push 0x317
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_DefWindowProcW]
push 1
lea ecx, [ebp - 0x3c]
mov eax, edi
call fcn.004143fa
push dword [ebp - 0x40]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov al, byte [ebp - 5]
pop edi
pop esi
pop ebx
leave
ret 0xc
test byte [ebp - 0xc], 8
je 0x414813
cmp dword [ebp - 0x14], ebx
jne 0x41483e
cmp dword [ebp - 0x10], ebx
je 0x41484c
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push ebx
lea ecx, [ebp - 0x3c]
mov eax, edi
call fcn.004143fa
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PrintWindow]
test eax, eax
jne 0x414807
mov byte [ebp - 5], bl
jmp 0x414813