Function at 0x1002f319
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10065493
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x7c
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
movzx eax, byte [ebp + 0x1c]
test eax, eax
je 0x1002f369
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x3c]
push 0
push 0x1f5b
push dword [ebp - 0x40]
call fcn.1003089e
add esp, 0x10
jmp 0x1002f5a6
lea eax, [ebp + 0x18]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax]
test eax, eax
je 0x1002f3a6
mov byte [ebp - 0x11], 0
movzx eax, byte [ebp - 0x11]
test eax, eax
je 0x1002f3a1
push 0xb63
push 0x788
call dword [sym.imp.GDI32.dll_SetMapMode]
jmp 0x1002f5a6
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x34], 0x71c0
mov dword [ebp - 0x58], 0x1000a2fc
cmp dword [ebp - 0x34], 0x7362
jle 0x1002f465
and dword [ebp - 0x24], 0
jmp 0x1002f3da
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x1a80
jge 0x1002f458
and dword [ebp - 0x1c], 0
jmp 0x1002f3f0
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x486e
jge 0x1002f453
and dword [ebp - 0x20], 0
jmp 0x1002f406
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x5f2e
jge 0x1002f451
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x20]
or eax, dword [ebp - 0x24]
cdq
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
push dword [ebp - 0x68]
push dword [ebp - 0x6c]
lea ecx, [ebp - 0x8c]
call fcn.1000defa
pop ecx
pop ecx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
call fcn.1001b176
push eax
call fcn.1004f7a6
pop ecx
lea ecx, [ebp - 0x8c]
call fcn.1001b16c
jmp 0x1002f3ff
jmp 0x1002f3e9
jmp 0x1002f3d3
push 0
push 0x2197
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x18], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x34], 0x6fbc
jge 0x1002f481
push dword [ebp - 0x58]
call fcn.1004f7a6
pop ecx
jmp 0x1002f49d
or dword [ebp - 4], 0xffffffff
jmp 0x1002f4a7
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x38], 0x32ec
mov dword [ebp - 0x64], 0x1000a334
cmp dword [ebp - 0x38], 0x3409
jle 0x1002f52f
and dword [ebp - 0x30], 0
jmp 0x1002f4d1
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xd7e
jge 0x1002f52f
and dword [ebp - 0x28], 0
jmp 0x1002f4e7
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x15e6
jge 0x1002f52d
and dword [ebp - 0x2c], 0
jmp 0x1002f4fd
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x48b8
jge 0x1002f52b
mov eax, dword [ebp - 0x28]
cdq
idiv dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
sub eax, edx
cdq
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], edx
push dword [ebp - 0x70]
push dword [ebp - 0x74]
mov ecx, 0x1060df18
call fcn.1001b196
jmp 0x1002f4f6
jmp 0x1002f4e0
jmp 0x1002f4ca
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
jmp 0x1002f545
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0xfffffff0
jg 0x1002f563
mov eax, dword [ebp - 0x60]
cmp dword [eax], 0
je 0x1002f557
jmp 0x1002f563
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
je 0x1002f561
jmp 0x1002f53a
jmp 0x1002f53a
mov dword [ebp - 4], 2
cmp dword [ebp - 0x38], 0x30a5
jge 0x1002f580
mov edx, dword [ebp - 0x64]
mov ecx, 0x1060df18
call fcn.1001d6a1
jmp 0x1002f59c
or dword [ebp - 4], 0xffffffff
jmp 0x1002f5a6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret