Function at 0x101639f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x440
mov ecx, dword [0x101d2014]
mov eax, dword [ebp + 8]
xor ecx, ebp
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x430], 0
mov ebx, dword [eax + 0x9c]
test ebx, ebx
je 0x10163b7a
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x10163b7a
mov ecx, dword [eax]
test ecx, ecx
je 0x10163b7a
cmp dword [eax + 4], 0
je 0x10163b7a
movzx eax, word [ebx + 8]
xor esi, esi
mov edx, 0
test al, 2
jne 0x10163a82
test al, al
js 0x10163a7f
mov edx, 2
bt eax, 8
jb 0x10163a82
mov edx, 3
test al, 0x10
jne 0x10163a82
mov edx, 4
test al, 0x20
jne 0x10163a82
mov edx, 5
test al, 0x40
jne 0x10163a82
jmp 0x10163b7a
xor edx, edx
inc edx
mov eax, dword [ebp + 0x10]
cmp eax, 0x330
jle 0x10163abe
cmp eax, 0x650
jg 0x10163af0
cmp eax, 0x3ff
jg 0x10163b36
cmp eax, 0x331
je 0x10163ba2
cmp eax, 0x341
jne 0x10163b7a
mov esi, 4
jmp 0x10163bd8
cmp eax, 0x140
jle 0x10163b13
cmp eax, 0x310
jg 0x10163b52
cmp eax, 0x141
je 0x10163ba9
cmp eax, 0x301
jne 0x10163b7a
mov esi, 6
jmp 0x10163bd8
cmp eax, 0x1007
jg 0x10163b65
cmp eax, 0x651
je 0x10163bb0
cmp eax, 0x1002
jne 0x10163b7a
mov esi, 0xb
jmp 0x10163bd8
cmp eax, 0x101
je 0x10163bb7
cmp eax, 0x121
je 0x10163bbe
cmp eax, 0x132
je 0x10163bd8
jmp 0x10163b7a
cmp eax, 0x400
je 0x10163bc5
cmp eax, 0x551
jne 0x10163b7a
mov esi, 0xd
jmp 0x10163bd8
cmp eax, 0x311
je 0x10163bcc
cmp eax, 0x321
jne 0x10163b7a
xor esi, esi
inc esi
jmp 0x10163bd8
cmp eax, 0x1008
je 0x10163bd3
cmp eax, 0x1081
jne 0x10163b7a
mov esi, 0xc
jmp 0x10163bd8
push 0
push 0xffffe001
call sym.nss3.dll_PR_SetError
add esp, 8
xor edi, edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, edi
add esp, 0x440
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, 7
jmp 0x10163bd8
mov esi, 9
jmp 0x10163bd8
mov esi, 0xe
jmp 0x10163bd8
mov esi, 8
jmp 0x10163bd8
mov esi, 2
jmp 0x10163bd8
mov esi, 3
jmp 0x10163bd8
mov esi, 5
jmp 0x10163bd8
mov esi, 0xa
mov dword [ebp - 0x43c], ecx
lea eax, [edx*4]
lea ecx, [esi + esi*2]
mov dword [ebp - 0x440], edx
mov dword [ebp - 0x448], esi
lea eax, [eax + ecx*8 + 0x101d6198]
mov dword [ebp - 0x444], eax
push 1
call fcn.10177310
add esp, 4
mov esi, dword [0x101d6194]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x10163ff9
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x444]
mov dword [esi + 8], edi
mov esi, dword [ebp - 0x440]
mov edi, dword [eax]
test edi, edi
je 0x10163c71
push edi
call fcn.10131a70
add esp, 4
test eax, eax
je 0x10163c5c
lock inc dword [edi + 0x2c]
jmp 0x10163f7a
push edi
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
mov eax, dword [ebp - 0x444]
mov dword [eax], 0
lea eax, [ebp - 0x420]
push eax
push esi
push dword [ebp - 0x448]
call fcn.1017c3e0
add esp, 0xc
test eax, eax
je 0x10163d6d
mov esi, dword [ebp + 0xc]
xor edi, edi
test esi, esi
je 0x10163f7a
mov eax, dword [ebp + 0x10]
push eax
push esi
call fcn.10139b90
add esp, 8
push dword [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
push esi
call sym.nss3.dll_PK11_KeyGen
add esp, 0x14
test eax, eax
je 0x10163f7a
mov edi, eax
xor esi, esi
push 0x410
push esi
lea eax, [ebp - 0x420]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebx + 0x18]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x42c], esi
push ebx
call fcn.100fa000
add esp, 4
add eax, 7
lea edx, [ebp - 0x420]
mov ecx, eax
shr ecx, 3
cmp eax, 0x2007
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x428], edx
ja 0x10163f7a
mov eax, dword [ebp - 0x440]
mov eax, dword [eax*4 + 0x101a805c]
cmp eax, 8
ja 0x10163f6d
mov ecx, 0x70
bt ecx, eax
jb 0x10163da0
mov ecx, 0x182
bt ecx, eax
jae 0x10163f6d
xor eax, eax
cmp dword [ebx + 4], 1
lea ecx, [ebp - 0x42c]
sete al
xor esi, esi
lea eax, [eax + eax - 1]
inc esi
push ecx
push edi
push 0
push eax
push ebx
call fcn.10132a10
add esp, 0x14
jmp 0x10163f69
mov edx, dword [ebp - 0x43c]
lea ecx, [ebp - 0x420]
push dword [ebp + 0x10]
push esi
call fcn.10164010
add esp, 8
mov edi, eax
test eax, eax
je 0x10163c8f
lock inc dword [edi + 0x2c]
mov eax, dword [ebp - 0x444]
mov dword [eax], edi
jmp 0x10163f7a
cmp dword [ebx + 4], 6
jne 0x10163e0b
lea eax, [ebx + 0x10]
lea esi, [ebp - 0x430]
push 0
push esi
push eax
call fcn.100f94e0
add esp, 0xc
mov ecx, dword [esi]
test eax, eax
je 0x10163e2d
test ecx, ecx
je 0x10163e2d
cmp dword [ecx + 0x1c], 0
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x438], eax
jne 0x10163de6
push ebx
call fcn.100fa000
add esp, 4
mov ecx, dword [ebp - 0x430]
mov dword [ecx + 0x1c], eax
mov eax, dword [ecx + 0x28]
add eax, dword [ecx + 0x18]
cmp eax, 0x1f8
jb 0x10163e48
push 0
push 0xffffe028
call sym.nss3.dll_PR_SetError
add esp, 8
xor eax, eax
xor ebx, ebx
jmp 0x10163f2d
push 0
push 0xffffe001
call sym.nss3.dll_PR_SetError
add esp, 8
mov esi, dword [ebp + 0x10]
xor eax, eax
xor ebx, ebx
dec eax
mov dword [ebp - 0x434], eax
jmp 0x10163f43
mov esi, dword [ebp + 0x10]
xor edx, edx
xor ebx, ebx
dec edx
test eax, eax
mov dword [ebp - 0x434], edx
jne 0x10163f3a
jmp 0x10163f49
xor ebx, ebx
push ebx
push ebx
push 1
push ebx
push 0x10c
push esi
push 0x1050
push ebx
push ebx
push ebx
push ecx
push dword [ebp - 0x43c]
call sym.nss3.dll_PK11_PubDeriveWithKDF
add esp, 0x30
test eax, eax
mov dword [ebp - 0x44c], eax
je 0x10163f2b
mov ecx, dword [ebp - 0x430]
lea edx, [ebp - 0x418]
movzx eax, word [ecx + 0x1c]
mov word [edx - 8], ax
mov ebx, dword [ecx + 0x18]
mov word [edx - 6], bx
push ebx
push dword [ecx + 0x14]
mov esi, ecx
push edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, esi
mov esi, dword [esi + 0x28]
lea eax, [ebp - 0x418]
mov word [eax - 4], si
mov eax, 0xffff
and ebx, eax
lea eax, [ebp + ebx - 0x418]
mov dword [ebp - 0x434], eax
push esi
push dword [ecx + 0x24]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, 0xffff
lea ecx, [ebp - 0x42c]
and esi, eax
mov eax, 0x1f8
add ebx, esi
add esi, dword [ebp - 0x434]
sub eax, ebx
mov dword [ecx + 8], eax
mov dword [ecx + 4], esi
mov esi, dword [ebp + 0x10]
push ecx
push edi
mov ebx, dword [ebp - 0x44c]
push ebx
push 0
push esi
call sym.nss3.dll_PK11_WrapSymKey
add esp, 0x14
test eax, eax
jne 0x10163f2e
movzx eax, word [ebp - 0x424]
mov dword [ebp - 0x434], 0
mov word [ebp - 0x41a], ax
jmp 0x10163f34
xor eax, eax
dec eax
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x438]
push eax
call sym.nss3.dll_SECKEY_DestroyPrivateKey
add esp, 4
mov ecx, dword [ebp - 0x430]
test ecx, ecx
je 0x10163f56
push ecx
call sym.nss3.dll_SECKEY_DestroyPublicKey
add esp, 4
test ebx, ebx
je 0x10163f63
push ebx
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
mov eax, dword [ebp - 0x434]
test eax, eax
je 0x10163f8d
push 0xffffd045
call fcn.10176550
add esp, 4
push dword [0x101d6194]
call sym.nss3.dll_PR_Unlock
add esp, 4
jmp 0x10163b8b
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x18], ax
mov esi, dword [ebp - 0x440]
movzx eax, word [ebp - 0x424]
mov word [ebp - 0x16], si
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x420]
push eax
call fcn.1017c4f0
add esp, 4
test eax, eax
jne 0x10163d8f
push edi
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
mov edx, dword [ebp - 0x43c]
lea ecx, [ebp - 0x420]
push ebx
push esi
call fcn.10164010
add esp, 8
mov edi, eax
test eax, eax
jne 0x10163d8f
xor edi, edi
jmp 0x10163f7a
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov edi, eax
jmp 0x10163c27