Function at 0x10160680
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x80
mov eax, dword [0x101d2014]
mov edx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [edx + 0x69c], 0
je 0x101606c3
xor esi, esi
dec esi
cmp dword [ebp + 0x10], 0x15
je 0x10160f7d
push 0
push 0xffffd0ac
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10160f7d
mov ecx, dword [edx + 0xc4]
mov esi, edx
call fcn.10160fa0
test eax, eax
je 0x10160764
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
cmp dword [esi + 0x148], 0
mov edx, esi
je 0x10160778
mov eax, dword [edx + 0x1c]
bt eax, 0xa
jb 0x1016070a
push dword [edx + 0x174]
call fcn.1013e010
mov edx, dword [ebp + 8]
add esp, 4
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 0x3b8]
bt eax, 0xa
movzx esi, word [ecx + 0x4c]
jb 0x1016072b
push dword [edx + 0x174]
call fcn.1013e0d0
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, dword [edx + 0x148]
mov edi, dword [edx]
mov ebx, dword [edx + 0x14c]
call dword [section..00cfg]
movzx eax, si
push ebx
mov ebx, dword [ebp + 0x18]
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edi
call ecx
add esp, 0x18
xor esi, esi
cmp eax, 1
sbb esi, esi
not esi
or esi, ebx
jmp 0x10160f7d
push 0
push 0xffffd053
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10160f7a
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x10160785
mov edi, dword [edx + 0x3b8]
test ebx, ebx
jle 0x10160f4c
lea esi, [edx + 0x64]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x68], esi
lea esi, [edi + 0x34]
mov dword [ebp - 0x88], esi
lea esi, [edx + 0x1f8]
mov dword [ebp - 0x80], esi
xor esi, esi
test byte [edx + 0x1d], 4
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x70], eax
jne 0x101607ca
push dword [edx + 0x174]
call fcn.1013e010
mov edx, dword [ebp + 8]
add esp, 4
movzx eax, word [edi + 0xf4]
movzx ecx, word [edi + 0x10]
mov dword [ebp - 0x8c], ebx
cmp ebx, eax
cmovb eax, ebx
cmp ecx, 0x302
mov dword [ebp - 0x6c], eax
lea eax, [eax + 0x64]
jb 0x101607fa
mov ecx, dword [edi + 0x14]
cmp dword [ecx + 0x10], 1
jne 0x101607fa
add eax, dword [ecx + 0x14]
mov ecx, dword [edx + 0x6c]
sub ecx, dword [edx + 0x68]
cmp eax, ecx
jbe 0x1016081f
push eax
push dword [ebp - 0x68]
call fcn.10175a30
add esp, 8
xor edi, edi
test eax, eax
mov ebx, 0
jne 0x101608e9
mov edi, dword [ebp - 0x60]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x58]
mov eax, dword [edi + 0x5c]
cmp edx, dword [ecx + 0x30]
sbb eax, dword [ecx + 0x34]
jae 0x101608d6
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x68]
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call fcn.101605c0
add esp, 0x14
test eax, eax
jne 0x101608e5
cmp dword [ebp - 0x54], 0
je 0x10160870
lea eax, [ebp - 0x58]
push eax
push 2
push dword [ebp - 0x68]
call fcn.10175e10
add esp, 0xc
test eax, eax
jne 0x101608e5
movzx eax, word [edi + 0x10]
cmp eax, 0x304
jb 0x10160a66
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x68]
mov ebx, dword [eax + 0x64]
add ebx, ecx
mov dword [ebp - 0x5c], ecx
push dword [ebp - 0x68]
push dword [ebp - 0x6c]
push dword [ebp - 0x70]
push dword [ebp + 0x10]
push edi
push eax
call fcn.101898a0
add esp, 0x18
test eax, eax
jne 0x101608e5
mov eax, dword [ebp + 8]
cmp dword [eax + 0x9f8], 1
jne 0x10160ea0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x68]
sub eax, dword [ebp - 0x5c]
push eax
push ebx
push dword [ecx + 0x64]
push edi
push ecx
call fcn.1015ce60
add esp, 0x14
mov ecx, eax
jmp 0x10160e98
push 0
push 0xffffd099
call sym.nss3.dll_PR_SetError
add esp, 8
xor edi, edi
xor ebx, ebx
mov edx, dword [ebp + 8]
test byte [edx + 0x1d], 4
jne 0x10160903
push dword [edx + 0x174]
call fcn.1013e0d0
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, dword [ebp - 0x78]
test bl, bl
je 0x10160f73
mov eax, dword [edx + 0x1fc]
mov ebx, ecx
and ebx, 0x40000000
or eax, ebx
je 0x101609ad
push dword [edx + 0x68]
push dword [edx + 0x64]
push dword [ebp - 0x80]
call fcn.10175ab0
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x10160f73
test ebx, ebx
jne 0x10160a40
mov dword [edx + 0x40], 1
push edx
mov ebx, edx
call fcn.10179d10
add esp, 4
test eax, eax
jns 0x10160992
cmp dword [0x101d4d40], 0
je 0x10160f42
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10160f24
cmp dword [eax + 0x28], 0xffffe892
mov ebx, dword [ebp + 8]
jne 0x10160f50
mov ecx, dword [ebp - 0x78]
mov edx, ebx
mov eax, ecx
or eax, 0x40000000
cmp dword [ebx + 0x1fc], 0
cmovne ecx, eax
jmp 0x10160a40
mov eax, ecx
mov dword [edx + 0x40], 1
and eax, 0x80ffffff
push eax
push dword [edx + 0x68]
push dword [edx + 0x64]
push edx
mov ebx, edx
call fcn.10175700
add esp, 0x10
test eax, eax
jns 0x10160a06
cmp dword [0x101d4d40], 0
je 0x10160f38
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ecx, eax
test eax, eax
je 0x10160f0e
xor eax, eax
cmp dword [ecx + 0x28], 0xffffe892
mov ebx, dword [ebp + 8]
jne 0x10160f50
mov ecx, dword [ebx + 0x68]
mov edx, ebx
sub ecx, eax
jbe 0x10160a3d
cmp dword [edx + 0x9f8], 1
je 0x10160f61
mov edx, dword [ebp - 0x68]
add eax, dword [edx]
push ecx
push eax
push dword [ebp - 0x80]
call fcn.10175ab0
add esp, 0xc
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x78]
test eax, eax
je 0x10160a40
jmp 0x10160f73
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x70]
mov ebx, dword [ebp - 0x8c]
add esi, edi
mov dword [edx + 0x68], 0
add eax, edi
sub ebx, edi
mov edi, dword [ebp - 0x60]
test ebx, ebx
jg 0x101607ad
jmp 0x10160f7d
mov edx, dword [ebp + 8]
movzx ecx, ax
lea ebx, [ebp - 0x1d]
cmp dword [edx + 0x9f8], 1
mov dword [ebp - 0x4c], ebx
sete byte [ebp - 0x5c]
cmp ecx, 0x302
mov ecx, 0
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], 0xd
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x40], 1
jb 0x10160b43
mov ecx, dword [edi + 0x14]
cmp dword [ecx + 0x10], 1
jne 0x10160b43
mov eax, dword [edx + 0x68]
mov edx, dword [edx + 0x6c]
mov ebx, dword [ecx + 0x14]
sub edx, eax
cmp ebx, edx
jbe 0x10160aca
push 0
push 0xffffe001
jmp 0x10160c65
mov ecx, dword [ebp - 0x68]
add eax, dword [ecx]
push ebx
push eax
call sym.nss3.dll_PK11_GenerateRandom
add esp, 8
test eax, eax
je 0x10160af3
push 0xffffd041
mov ebx, eax
call fcn.10176550
mov ecx, ebx
add esp, 4
jmp 0x10160e98
mov eax, dword [ebp + 8]
mov edx, edi
mov ecx, dword [edx + 0x1c]
mov edx, dword [edx + 0x20]
mov edi, dword [eax + 0x64]
mov dword [ebp - 0x64], edx
add edi, dword [eax + 0x68]
call dword [section..00cfg]
push ebx
push edi
push ebx
lea eax, [ebp - 0x50]
push eax
push edi
push dword [ebp - 0x64]
call ecx
add esp, 0x18
test eax, eax
jne 0x10160e83
cmp dword [ebp - 0x50], ebx
jne 0x10160e83
push 0
push ebx
push dword [ebp - 0x68]
call fcn.10175e10
add esp, 0xc
mov eax, dword [ebp - 0x60]
movzx eax, word [eax + 0x10]
mov cl, byte [ebp - 0x5c]
xor edx, edx
lea ebx, [ebp - 0x4c]
mov dl, cl
mov ecx, dword [ebp - 0x60]
mov edi, edx
movzx ecx, word [ecx + 0x12]
mov dword [ebp - 0x5c], ecx
movzx ecx, ax
xor eax, eax
cmp ecx, 0x300
mov ecx, dword [ebp - 0x60]
seta al
mov edx, dword [ecx + 0x58]
mov ecx, dword [ebp - 0x60]
movzx ecx, word [ecx + 0x4c]
push ebx
mov ebx, dword [ebp - 0x6c]
push ebx
mov dword [ebp - 0x64], edi
push edi
push dword [ebp - 0x5c]
mov edi, dword [ebp - 0x60]
push eax
push dword [ebp + 0x10]
push dword [edi + 0x5c]
call fcn.10160520
add esp, 0x1c
mov ecx, dword [edi + 0x14]
mov eax, dword [ecx + 0x10]
cmp eax, 2
jne 0x10160c72
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x1c]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
add eax, ebx
mov dword [ebp - 0x74], edx
add eax, edx
mov edx, dword [edi + 0x6c]
sub edx, dword [edi + 0x68]
mov edi, dword [ebp - 0x60]
cmp eax, edx
mov edx, 0xffffe001
ja 0x10160c62
mov ebx, dword [ecx + 0x14]
xor ecx, ecx
cmp dword [ebp - 0x5c], 0
movzx edx, word [edi + 0x4c]
sete cl
lea eax, [ebx - 8]
lea ecx, [ecx + ecx + 2]
cmovne eax, ebx
mov dword [ebp - 0x7c], ecx
push edx
push ebx
push eax
push dword [ebp - 0x88]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x64]
call fcn.10189020
add esp, 0x18
mov edi, dword [ebp + 8]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x5c]
mov edx, dword [edi + 0x6c]
mov ecx, dword [edi + 0x68]
sub edx, eax
sub edx, ecx
add ecx, dword [edi + 0x64]
lea edi, [ebx + eax]
add ecx, eax
mov eax, dword [ebp - 0x64]
shl eax, 3
push dword [ebp - 0x6c]
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push edx
lea edx, [ebp - 0x50]
push edx
push ecx
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
mov ecx, 0
push ecx
push ecx
push edi
mov edi, dword [ebp - 0x60]
lea edx, [ebp - 0x38]
push edx
push edx
push eax
push dword [ebp - 0x7c]
push ecx
push dword [edi + 0x20]
call fcn.10189080
add esp, 0x44
mov edx, 0xffffd046
test eax, eax
je 0x10160ed0
push 0
push edx
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10160e95
mov ecx, dword [ecx + 0x18]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x74], ecx
mov ecx, dword [edi + 0x18]
cmp dword [ecx], 0
je 0x10160d14
mov eax, dword [ebp - 0x4c]
mov edi, dword [edi + 0x30]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x84], eax
mov eax, ebx
mov ebx, dword [edx + 0x64]
add ebx, dword [edx + 0x68]
add ebx, eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x5c], eax
push edi
call sym.nss3.dll_PK11_DigestBegin
add esp, 4
mov dword [ebp - 0x7c], eax
push dword [ebp - 0x84]
push dword [ebp - 0x64]
push edi
call sym.nss3.dll_PK11_DigestOp
add esp, 0xc
mov dword [ebp - 0x64], eax
push dword [ebp - 0x6c]
push dword [ebp - 0x70]
push edi
call sym.nss3.dll_PK11_DigestOp
add esp, 0xc
or eax, dword [ebp - 0x7c]
or eax, dword [ebp - 0x64]
mov dword [ebp - 0x64], eax
push dword [ebp - 0x5c]
lea eax, [ebp - 0x3c]
push eax
push ebx
push edi
call sym.nss3.dll_PK11_DigestFinal
add esp, 0x10
or eax, dword [ebp - 0x64]
je 0x10160d1f
mov edi, 0xffffd04b
push edi
call fcn.10176550
add esp, 4
push edi
call fcn.10176550
add esp, 4
jmp 0x10160e92
mov dword [ebp - 0x3c], 0
xor ecx, ecx
jmp 0x10160d2e
mov edi, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x6c]
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x10]
cmp eax, 1
mov dword [ebp - 0x64], 0
jne 0x10160d98
mov dword [ebp - 0x5c], ecx
add ecx, ebx
mov eax, ebx
mov ebx, dword [ebp - 0x74]
xor edx, edx
div ebx
mov eax, ecx
dec ebx
not eax
mov dword [ebp - 0x64], edx
and eax, ebx
lea ebx, [eax + 1]
test eax, eax
js 0x10160d90
mov edx, dword [ebp + 8]
cmp ebx, 2
mov edi, ebx
mov edx, dword [edx + 0x64]
mov dword [ebp - 0x74], edx
jl 0x10160d6c
xor edi, edi
inc edi
mov edx, dword [ebp + 8]
add ecx, edi
add ecx, dword [edx + 0x68]
mov edx, dword [ebp - 0x74]
lea ecx, [edx + ecx - 1]
mov edx, eax
sub edx, edi
add edx, 2
push edx
push eax
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edi, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
add ecx, ebx
mov ebx, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x64]
mov eax, ebx
sub ebx, edx
cmp eax, 0x100
cmovb edx, eax
mov eax, 0
cmovb ebx, eax
test edx, edx
je 0x10160dd5
add ecx, edx
mov dword [ebp - 0x5c], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x64]
add eax, dword [ecx + 0x68]
mov ecx, dword [ebp - 0x70]
add eax, ebx
add ecx, ebx
push edx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
jmp 0x10160dd8
mov dword [ebp - 0x5c], ecx
test ebx, ebx
je 0x10160e29
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], 0
mov edx, edi
mov ecx, dword [edx + 0x1c]
mov edx, dword [edx + 0x20]
mov edi, dword [eax + 0x64]
mov dword [ebp - 0x64], edx
add edi, dword [eax + 0x68]
call dword [section..00cfg]
push ebx
push dword [ebp - 0x70]
push ebx
lea eax, [ebp - 0x38]
push eax
push edi
push dword [ebp - 0x64]
call ecx
add esp, 0x18
test eax, eax
jne 0x10160e83
cmp dword [ebp - 0x38], ebx
jne 0x10160e83
push 0
push ebx
push dword [ebp - 0x68]
call fcn.10175e10
add esp, 0xc
mov edi, dword [ebp - 0x60]
xor ecx, ecx
cmp dword [ebp - 0x5c], 0
mov eax, dword [ebp + 8]
je 0x10160e98
mov dword [ebp - 0x38], 0
mov edx, edi
mov edi, dword [eax + 0x64]
mov ecx, dword [edx + 0x1c]
mov ebx, dword [edx + 0x20]
add edi, dword [eax + 0x68]
call dword [section..00cfg]
push dword [ebp - 0x5c]
push edi
push dword [ebp - 0x5c]
lea eax, [ebp - 0x38]
push eax
push edi
push ebx
call ecx
mov ecx, dword [ebp - 0x5c]
add esp, 0x18
test eax, eax
jne 0x10160e83
cmp dword [ebp - 0x38], ecx
jne 0x10160e83
push 0
push ecx
push dword [ebp - 0x68]
call fcn.10175e10
add esp, 0xc
mov edi, dword [ebp - 0x60]
jmp 0x10160f0a
push 0
push 0xffffd046
call sym.nss3.dll_PR_SetError
add esp, 8
mov edi, dword [ebp - 0x60]
xor ecx, ecx
dec ecx
test ecx, ecx
jne 0x101608e5
cmp dword [ebp - 0x54], 0
je 0x10160ebe
push 2
push dword [ebp - 0x58]
push dword [ebp - 0x68]
call fcn.10175ea0
add esp, 0xc
test eax, eax
jne 0x101608e5
add dword [edi + 0x58], 1
mov bl, 1
adc dword [edi + 0x5c], 0
mov edi, dword [ebp - 0x6c]
jmp 0x101608e9
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x5c]
add eax, ecx
test ecx, ecx
mov dword [ebp - 0x50], eax
je 0x10160efc
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x64]
add eax, dword [ecx + 0x68]
lea ecx, [ebp + ebx - 0x38]
push dword [ebp - 0x5c]
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x50]
push 0
push eax
push dword [ebp - 0x68]
call fcn.10175e10
add esp, 0xc
xor ecx, ecx
jmp 0x10160e98
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov ecx, eax
jmp 0x101609f4
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x10160982
call sym.nss3.dll_PR_Init
jmp 0x101609de
call sym.nss3.dll_PR_Init
jmp 0x1016096e
xor esi, esi
jmp 0x10160f7d
push 0xffffd048
call fcn.10176550
add esp, 4
mov edx, ebx
jmp 0x10160f73
push 0
push 0xffffe892
call sym.nss3.dll_PR_SetError
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x68], 0
xor esi, esi
dec esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, esi
add esp, 0x80
pop esi
pop edi
pop ebx
pop ebp
ret