Function at 0x41704c
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.00412ae8
movzx eax, ax
mov dword [ebp - 0xc], eax
test al, 1
je 0x417073
mov al, 1
jmp 0x417397
xor ebx, ebx
cmp ax, bx
jne 0x417084
mov dword [ebp - 0xc], 2
mov eax, dword [ebp - 0xc]
cmp byte [ebp + 0x10], bl
je 0x417098
test al, 2
je 0x417098
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 0x4170c9
xor al, al
jmp 0x417397
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 0x41710c
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x98]
cmp eax, ecx
jge 0x4170fb
sub eax, ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x9c]
cmp eax, ecx
jge 0x41710c
sub eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
and eax, 2
mov dword [ebp - 0x44], eax
je 0x417163
test dword [ebp - 0x7c], 0x20000000
je 0x417125
mov byte [ebp + 0x13], bl
jmp 0x417166
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 0x417166
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x88]
cmp eax, ecx
jge 0x417150
sub eax, ecx
mov dword [ebp - 0x1c], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x8c]
cmp eax, ecx
jge 0x417166
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x417166
mov byte [ebp + 0x13], dl
cmp byte [ebp - 6], bl
jne 0x417174
cmp byte [ebp + 0x13], bl
je 0x41706c
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
cmp edi, ebx
je 0x4170c2
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 0x4170c2
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 0x4171be
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4170c2
mov byte [ebp - 5], 1
cmp word [ebp - 0x44], bx
je 0x41733d
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 [0x42a59c]
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 0x41728d
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x41728d
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], ebx
jne 0x417236
cmp dword [ebp - 0x10], ebx
je 0x417244
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.00416f6a
push ebx
push 1
push 0x85
push dword [ebp + 0xc]
mov byte [ebp - 0x64], bl
call edi
cmp byte [ebp - 0x64], bl
jne 0x417276
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.00416f6a
push dword [ebp - 0xc]
push esi
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp byte [ebp + 0x13], 1
jne 0x41732e
cmp dword [ebp - 0x18], ebx
jne 0x4172a4
mov byte [ebp + 0x13], bl
cmp dword [ebp - 0x1c], ebx
je 0x4172a8
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 0x4172c5
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.00416f6a
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 0x4172ff
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 0x417321
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.00416f6a
push ebx
push dword [0x42a59c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x417383
test byte [ebp - 0xc], 4
je 0x41739e
cmp dword [ebp - 0x14], ebx
jne 0x41734d
cmp dword [ebp - 0x10], ebx
je 0x41735b
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.00416f6a
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.00416f6a
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 0x417383
cmp dword [ebp - 0x14], ebx
jne 0x4173ae
cmp dword [ebp - 0x10], ebx
je 0x4173bc
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.00416f6a
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PrintWindow]
test eax, eax
jne 0x417377
mov byte [ebp - 5], bl
jmp 0x417383