Function at 0x10007bb0
Capabilities:
Get thread local storage value
Inspect section memory permissions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x10064870]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
push dword [0x10064010]
xor esi, esi
mov dword [esp + 0x14], esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10008ffd
cmp dword [eax + 0x1078], esi
je 0x10008ffd
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10008ff3
mov edx, dword [eax + 0x1078]
mov dword [esp + 0x24], edx
test edx, edx
je 0x1002be4a
test byte [edx + 0x2c], 2
jne 0x10008ff3
jmp 0x10008e74
cmp dword [0x10066330], 0
lea ecx, [edx + 4]
mov esi, 1
je 0x1000eab6
mov eax, esi
lock xadd dword [ecx], eax
mov eax, dword [ebp + 0x14]
inc dword [edx + 8]
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0xc]
and eax, 0xf
mov dword [esp + 0x38], ecx
cmp eax, 5
jne 0x10008e2c
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x1001ff7a
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1000ead2
mov eax, dword [eax + 0x1078]
test eax, eax
je 0x1001ffa8
mov eax, dword [eax + 0x3c]
mov eax, dword [eax + 8]
mov ebx, dword [eax + 8]
test ebx, ebx
jne 0x10008e85
jmp case.0x10008e36.5
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
je 0x1002032a
dec dword [edx + 8]
cmp dword [0x10066330], 0
mov dword [esp + 0x2c], 0
je 0x10020348
lea eax, [edx + 4]
lock xadd dword [eax], edi
dec edi
test edi, edi
je 0x10020353
mov eax, dword [esp + 0x44]
cmp dword [eax + 0x18], 0
jne 0x1002036b
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
call fcn.1001f0a0
jmp 0x10008f25
call fcn.10002e40
mov esp, ebp
pop ebp
ret 0x10
lock xadd dword [eax], esi
inc esi
mov eax, dword [ebx + 0x3c]
test eax, 0x800000
jne 0x10008f86
test eax, 0x4000
jne 0x10008f90
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 0x3c]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1000]
lea edi, [eax + 0x1000]
mov dword [esp + 0x14], eax
test esi, esi
jle 0x1000ea85
dec esi
push 0xb4
mov dword [edi], esi
push 0
mov esi, dword [eax + esi*4]
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
je 0x10008fe0
push dword [0x10064010]
mov dword [esi + 4], 1
mov dword [esi + 0xc], 0
mov dword [esi], 0x10003864
mov dword [esi + 0x14], 0x10019320
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1000eae2
mov eax, dword [eax + 0x1078]
test eax, eax
je 0x10020012
mov dword [esi + 0x10], eax
mov dword [esi], 0x100034f0
mov dword [esi + 0x38], 0
mov eax, dword [esi + 0x40]
and eax, 0xffffff91
mov dword [esi + 0x3c], 0x10000007
or dword [esi + 0x3c], 0x20000000
or eax, 0x11
mov dword [esi + 0x44], 0
mov dword [esi + 0x88], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x70], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x80], 0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x40], eax
mov ecx, dword [0x100646b8]
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x10008ef9
jmp 0x100202c4
mov ecx, edi
call dword [0x10067390]
mov ecx, dword [esp + 0x14]
call edi
cmp eax, 0xa
jne 0x100202c4
mov eax, dword [esp + 0x14]
xor edi, edi
mov eax, dword [eax + 0x1c]
inc edi
test eax, eax
jne 0x10008286
mov eax, dword [esi + 0xc]
lea edx, [esi + 0xc]
test eax, eax
jne 0x1000eae9
cmp eax, edi
je 0x1000eaa7
test edi, edi
je 0x10020021
lea ecx, [edi + 1]
cmp ecx, edi
jb 0x100202c4
xor eax, eax
shld eax, ecx, 2
shl ecx, 2
test eax, eax
ja 0x100202c4
jb 0x100082d3
cmp ecx, 0xffffffff
ja 0x100202c4
mov eax, dword [edx]
test eax, eax
jne 0x10020030
push ecx
push 8
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x100202c4
add eax, 4
lea edx, [esi + 0xc]
mov dword [edx], eax
mov dword [eax - 4], edi
jmp 0x1000eaa7
mov eax, dword [edx]
mov dword [eax + ecx*4], esi
inc ecx
cmp ecx, edi
jl 0x10008305
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax + 0x20]
mov dword [esi + 8], eax
mov eax, ecx
test ecx, ecx
je 0x1002004f
mov edx, dword [ebp + 0x14]
mov dword [esi + 0x18], edx
xor edx, edx
mov dword [esi + 0x14], eax
test ecx, ecx
je 0x1002005e
test byte [ebx + 0x3c], 1
je 0x1000eaf1
lea ecx, [ebx + 0x28]
lea eax, [esi + 0x28]
mov dword [esp + 0x20], ecx
mov dword [eax], ecx
mov ecx, dword [ebx + 0x2c]
mov dword [ebx + 0x2c], eax
test ecx, ecx
je 0x1000835f
mov dword [eax + 8], ecx
mov dword [ecx + 0xc], eax
test dword [esi + 0x3c], 0x10000000
je 0x10008f9a
mov eax, 1
dec eax
jne 0x10017b99
test dword [ebx + 0x3c], 0x10000000
je 0x1002007d
lea edi, [eax + 1]
xor ecx, ecx
test dword [ebx + 0x3c], 0x10000000
je 0x10017b85
xor eax, eax
cmp ecx, eax
jne 0x100200be
test dword [esi + 0x3c], 0x40000
jne 0x10008fa4
mov eax, 2
dec eax
je 0x10008fae
dec eax
jne 0x100083ca
test dword [ebx + 0x3c], 0x40000
je 0x1000ea6f
mov ecx, ebx
call fcn.100048f0
mov edi, eax
test edi, edi
je 0x10020103
xor edx, edx
xor ecx, ecx
test dword [ebx + 0x3c], 0x40000
je 0x1000ea7b
xor eax, eax
cmp ecx, eax
jne 0x10020135
test dword [esi + 0x3c], 0x200000
jne 0x10008fb8
mov eax, 2
dec eax
je 0x10008fc2
dec eax
jne 0x1001e401
test dword [ebx + 0x3c], 0x200000
jne 0x1001e401
xor edi, edi
mov ecx, 1
test dword [ebx + 0x3c], 0x200000
jne 0x10012ed4
mov eax, 1
cmp ecx, eax
jne 0x100201b6
test dword [esi + 0x3c], 0x80000000
jne 0x10008fcc
mov eax, 2
dec eax
je 0x10008fd6
dec eax
jne 0x100201fb
test dword [ebx + 0x3c], 0x80000000
jne 0x100201fb
xor edi, edi
mov ecx, 1
test dword [ebx + 0x3c], 0x80000000
jne 0x1000eafa
mov eax, 1
cmp ecx, eax
jne 0x1002023e
mov ecx, esi
mov eax, dword [ecx + 0x3c]
test eax, 0x40000000
jne 0x100084b2
or eax, 0x40000000
mov dword [ecx + 0x3c], eax
mov ecx, dword [ecx + 0x28]
test ecx, ecx
je 0x100084b2
add ecx, 0xffffffd8
jne 0x10008494
test dword [esi + 0x3c], 0x4000
jne 0x10020284
mov dword [esp + 0x20], esi
mov ebx, edx
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x18]
test ebx, ebx
js 0x100202e7
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
test eax, eax
je 0x100202da
dec dword [edi + 0x10]
jne 0x100084fc
cmp dword [edi + 0x14], 0
jne 0x100202fb
xor eax, eax
mov dword [edi + 0x18], ecx
test eax, eax
je 0x10008f0c
jmp 0x1002030f
mov ecx, edi
call dword [0x10067390]
mov ecx, ebx
call edi
jmp 0x10008eb3
mov edx, dword [eax + 0x1078]
mov dword [esp + 0xc], edx
test edx, edx
je 0x1001ffb7
test edi, edi
je 0x1001ffc9
test byte [edx + 0x2c], 2
jne 0x1001ffc9
cmp dword [edx + 0x24], 0
lea eax, [edx + 0xc]
mov dword [esp + 0x30], edx
mov dword [esp + 0x44], eax
jne 0x1001ffe4
cmp dword [0x10066330], 0
lea ecx, [edx + 4]
je 0x1000ead9
mov eax, esi
lock xadd dword [ecx], eax
inc dword [edx + 8]
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x2c], edi
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
test ecx, ecx
jne 0x10008ed2
mov dword [edi + 0x14], ecx
jmp 0x10008ed2
dec eax
cmp eax, 6
ja case.0x10008e36.5
jmp dword [eax*4 + 0x10009008]
mov esi, dword [ebp + 8]
test esi, esi
je case.0x10008e36.5
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je case.0x10008e36.5
lea eax, [esp + 0x40]
mov ecx, esi
push eax
lea edx, [esp + 0x3c]
call fcn.10016da7
test eax, eax
jns 0x10008f51
jmp 0x1000eabf
cmp dword [edx + 0x24], esi
lea eax, [edx + 0xc]
je 0x10007c24
jmp 0x1002be55
mov eax, dword [ebx]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov edi, dword [eax + 0x20]
cmp edi, fcn.10003470
jne 0x1000850e
jmp 0x10008f35
mov edi, eax
mov dword [esp + 0x18], eax
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
jne 0x1000851f
jmp 0x10008f7b
cmp dword [0x10066330], 0
lea eax, [edi + 4]
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], ecx
mov dword [edi + 0x18], esi
mov dword [esp + 0x28], eax
jne 0x10008126
jmp 0x10020001
mov eax, dword [ecx]
mov edi, dword [eax + 0x10]
cmp edi, fcn.10004670
jne 0x10008269
jmp 0x10008f47
mov ecx, dword [esp + 0x28]
or edi, 0xffffffff
cmp dword [0x10066330], 0
jne 0x10007ca2
jmp 0x10008fea
mov ecx, dword [esp + 0x54]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
jmp 0x10007cf9
mov ecx, ebx
call fcn.10003470
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x10008eb9
call fcn.10004670
jmp 0x10008277
mov eax, dword [esp + 0x40]
test eax, eax
je 0x1000eacb
mov esi, eax
jmp 0x10007ceb
xor esi, esi
jmp 0x10007ceb
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x1000eacb
xor edx, edx
mov dword [esp + 0xc], edx
jmp 0x1001ffc1
mov ebx, 0x80040046
jmp 0x100202e7
mov ebx, 0x80070057
jmp 0x100084d5
mov eax, 2
jmp 0x10008371
mov eax, 1
jmp 0x100083b3
mov edi, 1
jmp 0x100083dd
mov eax, 1
jmp 0x10008408
mov edi, 1
jmp 0x100201af
mov eax, 1
jmp 0x10008456
mov edi, 1
jmp 0x10020237
mov ebx, 0x8007000e
jmp 0x100084c9
dec dword [ecx]
mov eax, dword [ecx]
jmp 0x10007ca9
push 0x80070057
jmp 0x10020384
push 0x80040014
jmp 0x10020384
cmp dword [ebp + 8], 0
jne case.0x10008e36.5
test ecx, ecx
je case.0x10008e36.5
lea edx, [esp + 0x50]
lea ecx, [esp + 0x38]
call fcn.1000dbe6
test eax, eax
js 0x1000eabf
mov eax, dword [esp + 0x50]
test eax, eax
je 0x1000eacb
mov esi, eax
jmp 0x10007ceb
xor edi, edi
mov ecx, 1
jmp 0x100083df
mov eax, 1
jmp 0x100083ee
push 0xb4
push ecx
mov edx, eax
mov ecx, edi
call fcn.10016da7
mov esi, dword [edi]
test esi, esi
je 0x10008fe0
mov eax, dword [esp + 0x14]
jmp 0x10008165
xor ecx, ecx
test edi, edi
jg 0x10008305
jmp 0x1000830f
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x10007c3f
push eax
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x10008f64
xor esi, esi
jmp 0x10007ceb
xor eax, eax
jmp 0x10007c8c
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x1000856e
xor eax, eax
jmp 0x100081dc
mov eax, dword [eax - 4]
jmp 0x1000829c
and dword [esi + 0x3c], 0xfffffffe
jmp 0x10008343
xor eax, eax
jmp 0x1000848a
xor eax, eax
jmp 0x1000843c
mov eax, 1
jmp 0x10008399
dec eax
je 0x10020073
jmp 0x1002007d
mov ecx, ebx
call fcn.100046a0
jmp 0x1002017a
push 0x80004001
call dword [sym.imp.kernel32.dll_SetLastError]
xor esi, esi
jmp 0x10007ceb
call fcn.10016da7
mov ebx, eax
test ebx, ebx
je case.0x10008e36.5
mov eax, dword [esp + 0x24]
cmp eax, dword [ebx + 0x10]
je 0x10008e85
push 0x8004001e
call dword [sym.imp.kernel32.dll_SetLastError]
xor esi, esi
jmp 0x10007ceb
mov dword [0], 0
jmp 0x10007c8c
mov dword [0], 0
test edx, edx
jne 0x10008531
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
lea ecx, [esp + 0x2c]
call fcn.10004795
xor esi, esi
jmp 0x10007ceb
cmp dword [0x10066330], 0
je 0x10008558
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edx, dword [esp + 0xc]
jmp 0x10008558
inc dword [eax]
mov eax, dword [eax]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], ecx
jmp 0x1000812b
mov dword [0], 0
jmp 0x100081dc
mov ecx, edx
call fcn.1001b759
lea edx, [esi + 0xc]
jmp 0x1000eaa7
add eax, 0xfffffffc
je 0x100082dd
push ecx
push eax
push 8
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
jmp 0x100082ed
xor edx, edx
mov eax, 0x10019320
mov dword [esi + 0x1c], edx
jmp 0x10008329
mov eax, dword [esi + 0x3c]
and eax, 0xffffefff
or eax, 0x10000000
mov dword [esi + 0x3c], eax
jmp 0x10008339
xor edi, edi
lea ecx, [eax + 1]
jmp 0x1000838a
mov ecx, ebx
call fcn.10018990
mov edi, eax
test edi, edi
je 0x100200b4
lea ecx, [ebx + 0x28]
call fcn.10004851
test eax, eax
je 0x100200ab
test dword [eax + 0x3c], 0x10000000
je 0x100200b2
lea ecx, [eax + 0x28]
call fcn.1000468b
test eax, eax
jne 0x10020096
xor edx, edx
jmp 0x10008388
xor edi, edi
xor edx, edx
lea ecx, [edx + 1]
jmp 0x1000838a
test edi, edi
je 0x100200d0
or dword [ebx + 0x3c], 0x10000000
mov edi, 1
jmp 0x100200dc
and dword [ebx + 0x3c], 0xefffffff
mov edi, 2
lea ecx, [ebx + 0x28]
call fcn.10003820
test eax, eax
je 0x100200fc
push 0
push fcn.10018990
push 0x10000000
push edi
mov ecx, eax
call fcn.10016da7
xor edx, edx
jmp 0x100083a1
lea ecx, [ebx + 0x28]
call fcn.10004851
test eax, eax
je 0x10020124
test dword [eax + 0x3c], 0x40000
jne 0x1002012b
lea ecx, [eax + 0x28]
call fcn.1000468b
test eax, eax
jne 0x1002010f
xor edx, edx
jmp 0x1000ea71
mov edi, 1
jmp 0x100083db
test edi, edi
je 0x10020147
or dword [ebx + 0x3c], 0x40000
mov edi, 1
jmp 0x10020153
and dword [ebx + 0x3c], 0xfffbffff
mov edi, 2
lea ecx, [ebx + 0x28]
call fcn.10003820
test eax, eax
je 0x10020173
push 0
push fcn.100048f0
push 0x40000
push edi
mov ecx, eax
call fcn.10016da7
xor edx, edx
jmp 0x100083f6
mov edi, eax
test edi, edi
jne 0x100201ad
lea ecx, [ebx + 0x28]
call fcn.10004851
test eax, eax
je 0x100201a1
test dword [eax + 0x3c], 0x200000
jne 0x100201a8
lea ecx, [eax + 0x28]
call fcn.1000468b
test eax, eax
jne 0x1002018c
xor edx, edx
jmp 0x10008425
mov edi, 1
xor edx, edx
xor ecx, ecx
jmp 0x1000842a
test edi, edi
je 0x100201c8
or dword [ebx + 0x3c], 0x200000
mov edi, 1
jmp 0x100201d4
and dword [ebx + 0x3c], 0xffdfffff
mov edi, 2
lea ecx, [ebx + 0x28]
call fcn.10003820
test eax, eax
je 0x100201f4
push 0
push fcn.100046a0
push 0x200000
push edi
mov ecx, eax
call fcn.10016da7
xor edx, edx
jmp 0x10008444
mov ecx, ebx
call fcn.10010f90
mov edi, eax
test edi, edi
jne 0x10020235
lea ecx, [ebx + 0x28]
call fcn.10004851
test eax, eax
je 0x10020229
test dword [eax + 0x3c], 0x80000000
jne 0x10020230
lea ecx, [eax + 0x28]
call fcn.1000468b
test eax, eax
jne 0x10020214
xor edx, edx
jmp 0x10008473
mov edi, 1
xor edx, edx
xor ecx, ecx
jmp 0x10008478
test edi, edi
je 0x10020250
or dword [ebx + 0x3c], 0x80000000
mov edi, 1
jmp 0x1002025c
and dword [ebx + 0x3c], 0x7fffffff
mov edi, 2
mov ecx, dword [esp + 0x20]
call fcn.10003820
test eax, eax
je 0x1002027d
push 0
push fcn.10010f90
push 0x80000000
push edi
mov ecx, eax
call fcn.10016da7
xor edx, edx
jmp 0x10008492
mov ecx, esi
call fcn.10003fe0
test eax, eax
jne 0x10020296
mov ebx, 0x80004005
jmp 0x100202ae
push esi
mov ecx, eax
call fcn.10016da7
mov edx, eax
mov dword [esp + 0x14], edx
test edx, edx
jns 0x100084bf
mov ebx, eax
mov eax, dword [esi]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x10067390]
mov ecx, esi
call edi
jmp 0x100084c9
mov eax, dword [esi]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x10067390]
mov ecx, esi
call edi
jmp 0x10008fe0
mov dword [esp + 0x10], 0
jmp 0x100084ed
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
jmp 0x100084ed
cmp dword [edi + 0x18], 0
je 0x100084fc
mov eax, 1
jmp 0x100084fe
add edi, 8
cmp dword [edi], 0
je 0x10008f0c
push edi
call fcn.10016da7
mov edx, dword [esp + 0xc]
jmp 0x10008f0c
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10067390]
mov ecx, ebx
call esi
mov edx, dword [esp + 0xc]
jmp 0x10007cb1
dec dword [edx + 4]
mov edi, dword [edx + 4]
jmp 0x10007cd1
mov eax, dword [edx]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10067390]
mov ecx, dword [esp + 0xc]
call esi
jmp 0x10007ce7
cmp dword [0x10066330], 0
je 0x10007ce7
push eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x10007ce7
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x10008f25
mov dword [0], esi
jmp 0x10008ff3
cmp dword [0x10066330], esi
je 0x10007c24
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x24]
jmp 0x10007c24
mov esi, dword [ebp + 8]
test esi, esi
je case.0x10008e36.5
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je case.0x10008e36.5
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
lea edx, [esp + 0x3c]
call fcn.10016da7
test eax, eax
js 0x1000eabf
mov esi, dword [esp + 0x4c]
jmp 0x10007ceb
mov ecx, dword [ebp + 8]
test ecx, ecx
je case.0x10008e36.5
lea eax, [esp + 0x48]
push eax
lea edx, [esp + 0x3c]
call fcn.10016da7
test eax, eax
js 0x1000eabf
mov esi, dword [esp + 0x48]
jmp 0x10007ceb