Function at 0x1018f940
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x238], eax
push edi
mov dword [ebp - 0x220], ebx
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10190227
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x23c], eax
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10190227
mov eax, dword [ecx]
call dword [eax + 0xc]
push 0x14
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x210], 0
lea edi, [eax + 0x10]
mov dword [ebp - 0x21c], edi
call fcn.10213511
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov esi, dword [ebx + 0x10]
or ebx, 0xffffffff
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x234], esi
cmp esi, dword [eax + 0xc]
je 0x1018ffec
mov eax, dword [0x1025a378]
mov ebx, dword [esi - 8]
cmp eax, 0xffffffff
je 0x1018fa96
cmp dword [0x1025a37c], 0xffffffff
je 0x1018fa96
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x228], eax
test ebx, ebx
je 0x1018fa62
mov dword [ebp - 0x224], 0
test eax, eax
jne 0x1018faa0
mov eax, dword [0x1025a380]
test eax, eax
je 0x1018faa0
lea ecx, [ebp - 0x224]
push ecx
call eax
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push dword [0x1025a378]
call ebx
push dword [ebp - 0x224]
push dword [0x1025a37c]
call ebx
jmp 0x1018faa0
test eax, eax
je 0x1018faa0
cmp dword [0x1025a384], 0
je 0x1018faa0
push dword [0x1025a37c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call dword [0x1025a384]
neg eax
sbb eax, eax
inc eax
push eax
push dword [0x1025a378]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1018faa0
mov dword [ebp - 0x228], 0
cmp dword [esi - 0x14], 0xc0000
jne 0x1018ff39
lea ecx, [ebp - 0x28c]
call fcn.10033240
cmp dword [esi - 0x30], 8
lea eax, [esi - 0x44]
jb 0x1018fac3
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x28c]
call fcn.1016a780
mov ecx, dword [0x1025638c]
test ecx, ecx
jne 0x1018fb30
lea ecx, [ebp - 0x215]
call fcn.1013ac20
cmp dword [0x1025638c], 0
jne 0x1018fb1f
mov eax, dword [0x102563a4]
test al, 1
jne 0x1018fb15
or eax, 1
mov ecx, 0x10256390
mov dword [0x102563a4], eax
call fcn.101cd100
push 0x10216e40
call fcn.101e22c0
add esp, 4
mov dword [0x1025638c], 0x10256390
lea ecx, [ebp - 0x215]
call fcn.1013ac40
mov ecx, dword [0x1025638c]
call fcn.101cd910
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.102134e7
mov ecx, dword [0x1025638c]
add esp, 0xc
test ecx, ecx
jne 0x1018fbac
lea ecx, [ebp - 0x216]
call fcn.1013ac20
cmp dword [0x1025638c], 0
jne 0x1018fb9b
mov eax, dword [0x102563a4]
test al, 1
jne 0x1018fb91
or eax, 1
mov ecx, 0x10256390
mov dword [0x102563a4], eax
call fcn.101cd100
push 0x10216e40
call fcn.101e22c0
add esp, 4
mov dword [0x1025638c], 0x10256390
lea ecx, [ebp - 0x216]
call fcn.1013ac40
mov ecx, dword [0x1025638c]
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x270]
call fcn.101cd6c0
test eax, eax
je 0x1018fe24
push ecx
mov dword [ebp - 0x22c], 1
mov esi, esp
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10190227
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x20c]
test eax, 0xffff0000
jne 0x1018fc0b
movzx eax, ax
mov ecx, esi
push eax
call fcn.10003b40
jmp 0x1018fc32
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1018fc14
sub ecx, edx
lea eax, [ebp - 0x20c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.10004050
mov ecx, dword [ebp - 0x220]
lea eax, [ebp - 0x230]
push eax
call fcn.1018eee0
mov esi, dword [ebp - 0x230]
mov ecx, 0x10219d7c
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1018fc77
test dx, dx
je 0x1018fc73
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1018fc77
add eax, 4
add ecx, 4
test dx, dx
jne 0x1018fc51
xor eax, eax
jmp 0x1018fc7c
sbb eax, eax
or eax, 1
test eax, eax
je 0x1018fe02
mov eax, dword [ebp - 0x214]
lea ecx, [ebp - 0x214]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x298]
push eax
call fcn.10020fd0
mov ebx, dword [ebp - 0x290]
cmp byte [ebx + 0xd], 0
jne 0x1018fcf1
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x10190227
mov ecx, esi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x1018fce8
test dx, dx
je 0x1018fce4
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x1018fce8
add ecx, 4
add eax, 4
test dx, dx
jne 0x1018fcc2
xor eax, eax
jmp 0x1018fced
sbb eax, eax
or eax, 1
test eax, eax
jns 0x1018fcf7
mov ebx, dword [ebp - 0x214]
cmp ebx, dword [ebp - 0x224]
jne 0x1018fe02
mov eax, 0x10219d7c
mov cx, word [edi]
cmp cx, word [eax]
jne 0x1018fd2e
test cx, cx
je 0x1018fd2a
mov cx, word [edi + 2]
cmp cx, word [eax + 2]
jne 0x1018fd2e
add edi, 4
add eax, 4
test cx, cx
jne 0x1018fd08
xor eax, eax
jmp 0x1018fd33
sbb eax, eax
or eax, 1
test eax, eax
je 0x1018fd49
push 1
push 0x10233710
lea ecx, [ebp - 0x21c]
call fcn.100048e0
push dword [esi - 0xc]
lea ecx, [ebp - 0x21c]
push esi
call fcn.100048e0
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0x214]
call fcn.10020fd0
mov ecx, dword [eax]
mov dword [ebp - 0x240], ecx
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ebp - 0x224], ecx
cmp byte [eax + 0xd], 0
jne 0x1018fda5
add eax, 0x10
lea ecx, [ebp - 0x214]
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.10023540
test al, al
je 0x1018fdfc
cmp dword [ebp - 0x210], 0xccccccc
je 0x10190222
mov ebx, dword [ebp - 0x214]
push 0x14
call fcn.10213511
mov edi, eax
lea eax, [esi - 0x10]
push eax
call fcn.10004ba0
add esp, 8
lea ecx, [ebp - 0x214]
add eax, 0x10
mov dword [edi + 0x10], eax
mov dword [edi], ebx
push edi
push dword [ebp - 0x224]
mov dword [edi + 4], ebx
push dword [ebp - 0x240]
mov dword [edi + 8], ebx
mov word [edi + 0xc], 0
call fcn.10007940
mov edi, dword [ebp - 0x21c]
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1018fe1c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x234]
jmp 0x1018fe27
or ebx, 0xffffffff
lea ecx, [ebp - 0x250]
call fcn.100336f0
mov edx, dword [ebp - 0x254]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fe4f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x258]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fe6c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x260]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fe89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x268]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fea6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x270]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fec3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x274]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fee0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x278]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018fefd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x280]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018ff1a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x288]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018ff3c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1018ff3c
or ebx, 0xffffffff
mov eax, dword [0x1025a378]
cmp eax, 0xffffffff
je 0x1018ffd4
cmp dword [0x1025a37c], 0xffffffff
je 0x1018ffd4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [ebp - 0x228], 0
je 0x1018ffa2
mov dword [ebp - 0x228], 0
test eax, eax
jne 0x1018ffd4
mov eax, dword [0x1025a380]
test eax, eax
je 0x1018ffd4
lea ecx, [ebp - 0x228]
push ecx
call eax
push eax
push dword [0x1025a378]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 0x228]
push dword [0x1025a37c]
jmp 0x1018ffce
test eax, eax
je 0x1018ffd4
cmp dword [0x1025a384], 0
je 0x1018ffd4
push dword [0x1025a37c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call dword [0x1025a384]
neg eax
sbb eax, eax
inc eax
push eax
push dword [0x1025a378]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x220]
sub esi, 0x44
mov dword [ebp - 0x234], esi
cmp esi, dword [eax + 0xc]
jne 0x1018f9f4
mov ecx, 0x10219d7c
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10190019
test dx, dx
je 0x10190015
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10190019
add eax, 4
add ecx, 4
test dx, dx
jne 0x1018fff3
xor eax, eax
jmp 0x1019001e
sbb eax, eax
or eax, 1
test eax, eax
jne 0x101900a8
cmp dword [ebp - 0x22c], eax
jne 0x101900a8
mov esi, dword [ebp - 0x244]
add esi, 0xfffffff0
push esi
call fcn.10004ba0
mov ecx, dword [ebp - 0x238]
add eax, 0x10
add esp, 4
mov dword [ecx], eax
mov eax, dword [ebp - 0x214]
push dword [eax + 4]
lea eax, [ebp - 0x214]
push eax
mov ecx, eax
call fcn.10020c80
push 0x14
push dword [ebp - 0x214]
call fcn.102134ff
add esp, 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1019008d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10190209
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10190209
mov ecx, 0x10219d7c
mov eax, edi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x101900d6
test dx, dx
je 0x101900d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x101900d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x101900b0
xor eax, eax
jmp 0x101900db
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10190141
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10190227
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x220]
push 0x9cd9
mov dword [ebp - 0x220], eax
call fcn.10003b40
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
call fcn.10004870
mov edx, dword [ebp - 0x220]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1019013b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x21c]
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10190227
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x22c]
push 0x9cda
mov dword [ebp - 0x22c], eax
call fcn.10003b40
mov esi, dword [ebp - 0x22c]
lea eax, [ebp - 0x23c]
push edi
push esi
push eax
call fcn.10004de0
add esp, 0xc
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1019019c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x23c]
add esi, 0xfffffff0
push esi
call fcn.10004ba0
mov ecx, dword [ebp - 0x238]
add eax, 0x10
add esp, 4
mov dword [ecx], eax
mov eax, dword [ebp - 0x214]
push dword [eax + 4]
lea eax, [ebp - 0x214]
push eax
mov ecx, eax
call fcn.10020c80
push 0x14
push dword [ebp - 0x214]
call fcn.102134ff
add esp, 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x101901f7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10190209
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x238]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret 4
call fcn.10007b50
push 0x80004005
call fcn.100030c0
int3