Function at 0x410d9e
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.004119c7
movzx eax, ax
mov dword [ebp - 0xc], eax
test al, 1
je 0x410dc5
mov al, 1
jmp 0x4110e9
xor ebx, ebx
cmp ax, bx
jne 0x410dd6
mov dword [ebp - 0xc], 2
mov eax, dword [ebp - 0xc]
cmp byte [ebp + 0x10], bl
je 0x410dea
test al, 2
je 0x410dea
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 0x410e1b
xor al, al
jmp 0x4110e9
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 0x410e5e
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x98]
cmp eax, ecx
jge 0x410e4d
sub eax, ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x9c]
cmp eax, ecx
jge 0x410e5e
sub eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
and eax, 2
mov dword [ebp - 0x44], eax
je 0x410eb5
test dword [ebp - 0x7c], 0x20000000
je 0x410e77
mov byte [ebp + 0x13], bl
jmp 0x410eb8
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 0x410eb8
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x88]
cmp eax, ecx
jge 0x410ea2
sub eax, ecx
mov dword [ebp - 0x1c], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x8c]
cmp eax, ecx
jge 0x410eb8
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x410eb8
mov byte [ebp + 0x13], dl
cmp byte [ebp - 6], bl
jne 0x410ec6
cmp byte [ebp + 0x13], bl
je 0x410dbe
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
cmp edi, ebx
je 0x410e14
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 0x410e14
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 0x410f10
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x410e14
mov byte [ebp - 5], 1
cmp word [ebp - 0x44], bx
je 0x41108f
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 [0x422ad4]
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 0x410fdf
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x410fdf
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], ebx
jne 0x410f88
cmp dword [ebp - 0x10], ebx
je 0x410f96
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.00410cbc
push ebx
push 1
push 0x85
push dword [ebp + 0xc]
mov byte [ebp - 0x64], bl
call edi
cmp byte [ebp - 0x64], bl
jne 0x410fc8
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.00410cbc
push dword [ebp - 0xc]
push esi
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp byte [ebp + 0x13], 1
jne 0x411080
cmp dword [ebp - 0x18], ebx
jne 0x410ff6
mov byte [ebp + 0x13], bl
cmp dword [ebp - 0x1c], ebx
je 0x410ffa
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 0x411017
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.00410cbc
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 0x411051
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 0x411073
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.00410cbc
push ebx
push dword [0x422ad4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x4110d5
test byte [ebp - 0xc], 4
je 0x4110f0
cmp dword [ebp - 0x14], ebx
jne 0x41109f
cmp dword [ebp - 0x10], ebx
je 0x4110ad
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.00410cbc
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.00410cbc
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 0x4110d5
cmp dword [ebp - 0x14], ebx
jne 0x411100
cmp dword [ebp - 0x10], ebx
je 0x41110e
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.00410cbc
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PrintWindow]
test eax, eax
jne 0x4110c9
mov byte [ebp - 5], bl
jmp 0x4110d5