Function at 0x1029dc64
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
mov eax, dword [0x103a5e84]
push ebx
push esi
xor ebx, ebx
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], ebx
cmp eax, ebx
je 0x1029dc8f
push eax
call fcn.101ff0a8
mov dword [0x103a5e84], ebx
mov eax, dword [0x103a5e88]
cmp eax, ebx
je 0x1029dca1
mov dword [ebp - 0xc], eax
mov dword [0x103a5e88], ebx
lea edi, [esi + 0x88]
mov eax, dword [edi]
cmp eax, ebx
je 0x1029dcb5
push eax
call fcn.101ff0a8
mov dword [edi], ebx
mov ebx, dword [ebp + 0x10]
push ebx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
je 0x1029dccf
mov ecx, esi
call fcn.1029da39
jmp 0x1029dfea
call fcn.10261033
push eax
push esi
lea ecx, [ebp - 0x54]
call fcn.1029db74
and dword [ebp - 8], 0
and dword [ebp - 4], 0
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x1029dd39
push 0xc
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
call fcn.102c024a
mov eax, dword [ebp - 0x34]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x24]
test eax, eax
je 0x1029dd1b
lea ecx, [eax - 0x20]
jmp 0x1029dd1d
xor ecx, ecx
test ecx, ecx
je 0x1029dd3c
test eax, eax
je 0x1029dd2a
lea ecx, [eax - 0x20]
jmp 0x1029dd2c
xor ecx, ecx
push 0xc
lea eax, [ebp - 0x34]
push eax
call fcn.102c024a
jmp 0x1029dd3c
mov dword [ebp + 8], esi
mov eax, dword [ebp + 0x14]
and eax, 4
mov dword [ebp - 0x24], eax
je 0x1029dd56
mov eax, dword [ebx]
neg eax
mov dword [ebp - 8], eax
mov eax, dword [ebx + 4]
neg eax
mov dword [ebp - 4], eax
and dword [ebp + 0x10], 0
lea ecx, [ebp - 0x84]
call fcn.102538c9
cmp dword [esi + 0x70], 0
je 0x1029ddc9
call fcn.1020788f
test al, al
jne 0x1029ddc9
mov ecx, dword [esi + 0x84]
test ecx, ecx
jne 0x1029dd92
call fcn.1029db08
mov dword [esi + 0x84], eax
test eax, eax
jne 0x1029dd97
jmp 0x1029dfe2
call fcn.10257c24
push dword [esi + 0x84]
lea ecx, [ebp - 0xb4]
call fcn.102538f7
push 0xc
pop ecx
mov esi, eax
lea edi, [ebp - 0x84]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x10]
lea eax, [edi + 0x40]
push eax
lea ecx, [ebp - 0x84]
call fcn.1025395b
jmp 0x1029de06
push dword [ebp + 0xc]
lea ecx, [ebp - 0xb4]
call fcn.10253864
push 0xc
pop ecx
mov esi, eax
lea edi, [ebp - 0x84]
rep movsd dword es:[edi], dword [esi]
call fcn.102d9477
test eax, eax
je 0x1029de03
push 1
push dword [ebp + 0xc]
call fcn.10259482
push dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edi, dword [ebp - 0x10]
test dword [edi + 0x38], 0x20000000
je 0x1029de80
test byte [ebp + 0x14], 2
jne 0x1029de80
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov ebx, dword [ebx + 0xc]
push 0xf
pop esi
sub eax, esi
sub edx, esi
add ecx, esi
add ebx, esi
mov esi, dword [edi + 0x40]
cmp eax, esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ebx
jg 0x1029de43
mov eax, esi
mov dword [ebp - 0x20], eax
mov esi, dword [edi + 0x48]
cmp ecx, esi
jl 0x1029de4f
mov ecx, esi
mov dword [ebp - 0x18], ecx
cmp eax, ecx
jge 0x1029de6f
mov eax, dword [edi + 0x44]
cmp edx, eax
jg 0x1029de5f
mov edx, eax
mov dword [ebp - 0x1c], edx
mov eax, dword [edi + 0x4c]
cmp ebx, eax
jl 0x1029de6b
mov ebx, eax
mov dword [ebp - 0x14], ebx
cmp edx, ebx
jl 0x1029de7d
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
lea ebx, [ebp - 0x20]
xor esi, esi
test byte [ebp + 0x14], 2
je 0x1029deaa
cmp dword [ebp - 0x6c], esi
jne 0x1029deaa
cmp dword [ebp - 0x24], esi
je 0x1029dea2
push dword [ebx + 4]
lea ecx, [ebp - 0x84]
push dword [ebx]
call fcn.1025392e
lea ecx, [ebp - 0x84]
jmp 0x1029ded7
push dword [0x1039deb8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ebx
lea ecx, [eax + 0x68]
call fcn.102ca07c
mov esi, eax
test esi, esi
je 0x1029dfe2
push dword [ebx + 4]
mov ecx, esi
push dword [ebx]
call fcn.1025392e
mov ecx, esi
push ebx
call fcn.1025395b
xor eax, eax
cmp dword [ebp - 0x6c], eax
jne 0x1029deed
cmp esi, eax
je 0x1029deed
mov dword [ebp - 0x44], esi
jmp 0x1029def6
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x34]
sub ecx, dword [edi + 0x40]
push eax
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x30]
sub ecx, dword [edi + 0x44]
push ebx
push dword [ebp - 0x44]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], ecx
call fcn.102544dc
push dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x48]
push eax
call fcn.102bff55
xor eax, eax
cmp dword [ebp - 0x6c], eax
je 0x1029df4d
push esi
push dword [edi + 0x84]
lea ecx, [ebp - 0xd4]
call fcn.10257d86
lea ecx, [ebp - 0xd4]
call fcn.10258543
jmp 0x1029df5f
cmp dword [ebp + 0x10], eax
je 0x1029df5f
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.GDI32.dll_SelectPalette]
mov ecx, edi
call fcn.1029da39
test esi, esi
je 0x1029dfb3
push 0xcc0020
mov byte [esi + 0x2c], 1
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov edx, dword [ebx + 0xc]
push eax
push ecx
push dword [esi + 0x10]
sub edx, eax
push edx
mov edx, dword [ebx + 8]
sub edx, ecx
push edx
mov edx, dword [ebp - 4]
add eax, edx
push eax
mov eax, dword [ebp - 8]
add ecx, eax
push ecx
push dword [ebp + 0xc]
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [0x1039deb8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
lea ecx, [eax + 0x68]
call fcn.102ca039
cmp dword [ebp - 0xc], 0
je 0x1029dfc1
push dword [ebp - 0xc]
call fcn.101ff0a8
add edi, 0x8c
mov eax, dword [edi]
test eax, eax
je 0x1029dfe2
cmp eax, 0xc30
jne 0x1029dfd9
call fcn.1029d7c0
push eax
call fcn.101ff0a8
and dword [edi], 0
lea ecx, [ebp - 0x54]
call fcn.1029db9c
pop edi
pop esi
pop ebx
leave
ret 0x10