Function at 0x100037b0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 4
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ebp, [eax + 0x49c]
lea edi, [eax + 0x4b4]
lea ebx, [eax + 0x4b0]
mov esi, eax
push ebx
mov dword [ebp], 2
push ebp
mov dword [esi + 0x4a0], edi
push 0xffffffffffffffff
mov dword [ebx], 2
mov eax, dword [esi + 0x4a0]
push eax
call fcn.1000e960
add esp, 0x10
mov dword [esi + 0x5d84], eax
test eax, eax
jne 0x10003c5b
cmp dword [ebp], 2
je 0x1000381e
mov eax, 0xfffffff7
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ecx, dword [esi + 0x4a0]
xor eax, eax
mov al, byte [ecx]
mov dword [esi + 0x4a8], eax
xor eax, eax
mov ecx, dword [esi + 0x4a0]
inc ecx
mov dword [esi + 0x4a0], ecx
mov al, byte [ecx]
mov ecx, dword [esi + 0x4a8]
shl ecx, 8
or eax, ecx
sub eax, 2
mov dword [esi + 0x4a8], eax
cmp eax, 0xc
jbe 0x10003865
mov eax, 0xfffffff7
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push ebx
mov dword [ebp], eax
push ebp
mov dword [esi + 0x4a0], edi
push 0xffffffffffffffff
mov dword [ebx], 2
mov eax, dword [esi + 0x4a0]
push eax
call fcn.1000e960
add esp, 0x10
mov dword [esi + 0x5d84], eax
test eax, eax
jne 0x10003c5b
mov eax, dword [ebp]
cmp dword [esi + 0x4a8], eax
jbe 0x100038ad
mov eax, 0xffffffcc
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [esi + 0x4a0]
mov cl, byte [eax]
inc eax
mov byte [esp + 0x10], cl
mov dword [esi + 0x4a0], eax
cmp byte [esi + 0x4a4], cl
jbe 0x100038f5
cmp cl, 1
jb 0x100038f5
mov eax, dword [esi + 0x4ac]
mov ecx, dword [eax + 0xe8]
add eax, 0xe8
test cl, 4
jne 0x100038f5
or ecx, 4
mov dword [eax], ecx
mov eax, dword [esi + 0x4ac]
or dword [eax + 0xe8], 0x20
mov cl, byte [esp + 0x10]
cmp byte [esi + 0x4a4], cl
je 0x1000391d
mov eax, dword [esi + 0x4ac]
test byte [eax + 0xe8], 4
jne 0x1000391d
mov eax, 0xfffffff7
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
xor bl, bl
mov al, byte [esp + 0x10]
mov dword [esi + 0x76c], eax
cmp al, bl
je 0x100039d7
mov ecx, dword [esi + 0x4a0]
xor eax, eax
mov al, byte [ecx]
inc ecx
xor edi, edi
mov dword [esi + 0x4a0], ecx
mov dl, byte [esi + 0x4a4]
test dl, dl
je 0x10003967
lea ebp, [esi + 0x780]
cmp dword [ebp], eax
je 0x10003967
add ebp, 4
inc edi
xor ecx, ecx
mov cl, dl
cmp edi, ecx
jl 0x10003956
xor ecx, ecx
mov cl, dl
cmp edi, ecx
jl 0x1000398e
cmp dword [esi + 0x780], 0xff
jne 0x1000397e
lea edi, [eax - 1]
test edi, edi
jl 0x10003a45
cmp edi, ecx
jge 0x10003a45
xor eax, eax
lea edx, [esi + edi*4]
mov al, bl
mov dword [esi + eax*4 + 0x770], edi
mov ecx, dword [esi + 0x4a0]
mov al, byte [ecx]
xor ecx, ecx
shr al, 4
mov cl, al
mov dword [edx + 0x4e4], ecx
mov ecx, dword [esi + 0x4a0]
inc bl
mov al, byte [ecx]
and al, 0xf
xor ecx, ecx
mov cl, al
mov dword [edx + 0x4d4], ecx
inc dword [esi + 0x4a0]
cmp bl, byte [esp + 0x10]
jb 0x10003933
mov eax, dword [esi + 0x4ac]
test byte [eax + 0xe8], 4
je 0x10003a52
mov eax, dword [esi + 0x4a0]
xor ecx, ecx
mov cl, byte [eax]
mov dword [esi + 0x79c], ecx
xor ecx, ecx
mov eax, dword [esi + 0x4a0]
inc eax
mov dword [esi + 0x4a0], eax
mov cl, byte [eax]
mov dword [esi + 0x7a0], ecx
xor ecx, ecx
mov eax, dword [esi + 0x4a0]
inc eax
mov dword [esi + 0x4a0], eax
mov al, byte [eax]
shr al, 4
mov cl, al
mov dword [esi + 0x7a4], ecx
xor ecx, ecx
mov eax, dword [esi + 0x4a0]
mov al, byte [eax]
and al, 0xf
mov cl, al
mov dword [esi + 0x7a8], ecx
inc dword [esi + 0x4a0]
jmp 0x10003a70
mov eax, 0xfffffff7
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
mov dword [esi + 0x79c], eax
mov dword [esi + 0x7a0], 0x3f
mov dword [esi + 0x7a4], eax
mov dword [esi + 0x7a8], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
xor ebx, ebx
call fcn.10002ac0
add esp, 8
mov ecx, dword [0x1002b150]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x76c], ebx
mov esi, eax
jle 0x10003aeb
lea edx, [esi + 0x770]
mov edi, dword [esi + 0x79c]
mov ebp, dword [esi + 0x7a0]
sub ebp, edi
mov eax, dword [esi + 0x7a8]
inc ebp
mov ch, al
mov cl, al
add edx, 4
mov eax, ecx
inc ebx
shl eax, 0x10
mov ax, cx
mov ecx, dword [edx - 4]
shl ecx, 6
add ecx, esi
lea edi, [ecx + edi + 0x9928]
mov ecx, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esi + 0x76c], ebx
jg 0x10003aa1
mov edi, 1
xor ebx, ebx
mov cl, byte [esi + 0x4a4]
mov dword [esp + 0x10], edi
cmp cl, bl
je 0x10003b17
lea eax, [esi + 0x9928]
cmp byte [eax], 0
jne 0x10003b43
add eax, 0x40
inc ebx
xor edx, edx
mov dl, cl
cmp edx, ebx
jg 0x10003b06
xor ebx, ebx
test cl, cl
je 0x10003b4f
mov edx, esi
mov ebp, 1
xor eax, eax
cmp byte [ebp + edx + 0x9928], al
jne 0x10003b47
inc ebp
cmp ebp, 0x40
jl 0x10003b26
add edx, 0x40
inc ebx
xor eax, eax
mov al, cl
cmp eax, ebx
jg 0x10003b1f
jmp 0x10003b4f
xor edi, edi
jmp 0x10003b4f
mov dword [esp + 0x10], 0
test edi, edi
je 0x10003b75
cmp dword [esp + 0x10], 0
je 0x10003b75
xor eax, eax
pop ebp
mov dword [esi + 0x5d54], 1
or dword [esi + 0x5d78], 2
pop edi
pop esi
pop ebx
add esp, 4
ret
and dword [esi + 0x5d78], 0xfffffffd
mov dword [esi + 0x5d54], 0
cmp dword [esi + 0x5d74], 0xffffffff
jne 0x10003ba2
test byte [esi + 0x5d38], 0x20
je 0x10003ba2
mov dword [esi + 0x5d74], 0xfffffffe
mov eax, dword [esi + 0x5d74]
cmp eax, 0xfffffffe
jne 0x10003bc1
xor eax, eax
pop ebp
mov dword [esi + 0x5d54], 1
pop edi
pop esi
pop ebx
add esp, 4
ret
test eax, eax
jne 0x10003bcf
mov dword [esi + 0x5d74], 1
mov eax, dword [esi + 0x5d74]
cmp eax, 1
jle 0x10003bf4
xor eax, eax
pop ebp
mov dword [esi + 0x5d54], 1
pop edi
dec dword [esi + 0x5d74]
pop esi
pop ebx
add esp, 4
ret
test edi, edi
je 0x10003c13
cmp dword [esp + 0x10], 0
je 0x10003c13
xor eax, eax
pop ebp
mov dword [esi + 0x5d54], 1
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp eax, 1
je 0x10003c59
cmp dword [esi + 0x79c], 0
jne 0x10003c34
cmp dword [esi + 0x7a4], 0
jne 0x10003c34
mov dword [esi + 0x5d54], 1
cmp dword [esi + 0x7a0], 0
je 0x10003c59
cmp dword [esi + 0x7a4], 0
jne 0x10003c59
cmp dword [esi + 0x770], 0
jne 0x10003c59
mov dword [esi + 0x5d54], 1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret