Function at 0x10165500
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [0x101d2014]
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
xor eax, ebp
mov dword [ebp - 0x10], eax
test byte [ecx + 0x1d], 4
jne 0x10165530
push dword [ecx + 0x170]
call sym.nss3.dll_PR_EnterMonitor
mov ecx, dword [ebp + 8]
add esp, 4
movzx esi, word [esi + 1]
mov ebx, 0xffffd01c
rol si, 8
movzx edi, si
cmp edi, 0x300
jb 0x1016566f
xor eax, eax
mov dword [ecx + 0x454], eax
mov dword [ecx + 0x45c], eax
mov dword [ecx + 0x46c], eax
mov eax, dword [ecx + 0x478]
test eax, eax
je 0x10165582
push 1
push eax
call sym.nss3.dll_PK11_DestroyContext
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ecx + 0x478], 0
mov eax, dword [ecx + 0x47c]
test eax, eax
je 0x101655a4
push 1
push eax
call sym.nss3.dll_PK11_DestroyContext
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ecx + 0x47c], 0
mov eax, dword [ecx + 0x480]
test eax, eax
je 0x101655c6
push 1
push eax
call sym.nss3.dll_PK11_DestroyContext
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ecx + 0x480], 0
mov eax, dword [ecx + 0x484]
test eax, eax
je 0x101655e8
push 1
push eax
call sym.nss3.dll_PK11_DestroyContext
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ecx + 0x484], 0
cmp dword [ecx + 0x450], 1
jne 0x1016561b
mov eax, dword [ebp + 0xc]
cmp edi, 0x303
movzx ebx, word [eax + 5]
movzx edx, word [eax + 3]
mov dword [ebp - 0x1c], ebx
movzx ebx, word [eax + 7]
mov eax, 0x2f
mov word [ecx + 0x5a], di
jbe 0x10165627
mov ebx, 0xffffd01c
jmp 0x10165660
mov eax, 0xa
mov ebx, 0xffffd02a
jmp 0x10165660
cmp dword [ecx + 0x614], 0
mov dword [ebp - 0x20], ebx
mov ebx, 0xffffd009
mov eax, 0xffffd009
je 0x101656a5
push 0
push eax
call sym.nss3.dll_PR_SetError
mov ecx, dword [ebp + 8]
add esp, 8
cmp edi, 0x300
mov eax, 0x46
mov edx, 0x28
cmova edx, eax
mov eax, edx
push eax
push 2
push ecx
call fcn.1015f2c0
mov ecx, dword [ebp + 8]
add esp, 0xc
test byte [ecx + 0x1d], 4
jne 0x10165683
push dword [ecx + 0x170]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
push 0
push ebx
call sym.nss3.dll_PR_SetError
add esp, 8
xor edi, edi
dec edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, edi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
movzx eax, word [ecx + 0x24]
test ax, ax
je 0x101656ea
cmp ax, si
mov eax, 0xffffd009
ja 0x1016563d
movzx eax, word [ecx + 0x26]
cmp ax, si
cmovbe esi, eax
cmp dword [ecx + 0x38], 0
je 0x101656f4
cmp word [ecx + 0x58], si
mov eax, 0xffffd009
jne 0x1016563d
mov word [ecx + 0x58], si
or byte [ecx + 0x540], 0x11
mov esi, dword [ebp - 0x1c]
jmp 0x10165798
mov eax, 0xffffd014
jmp 0x1016563d
mov word [ecx + 0x58], si
or byte [ecx + 0x540], 0x11
mov ebx, edx
test byte [ecx + 0x1d], 4
jne 0x1016571c
push dword [ecx + 0x174]
call fcn.1013e140
mov ecx, dword [ebp + 8]
add esp, 4
movzx esi, word [ecx + 0x58]
mov eax, dword [ecx + 0x3b8]
mov word [eax + 0x10], si
movzx edi, word [ecx + 0x58]
mov edx, dword [ecx + 0x9f8]
cmp edi, 0x304
jb 0x1016574a
cmp edx, 1
mov edx, 0xfefd
mov edi, 0x303
cmove edi, edx
jmp 0x10165773
cmp edx, 1
jne 0x10165773
movzx ecx, di
mov edx, 0xfefd
mov esi, 0xffff
mov edi, 0xfeff
cmp ecx, 0x303
cmove esi, edx
cmp ecx, 0x302
cmovne edi, esi
mov ecx, dword [ebp + 8]
mov word [eax + 0x12], di
mov esi, dword [ebp - 0x1c]
mov edx, ebx
test byte [ecx + 0x1d], 4
jne 0x10165798
push dword [ecx + 0x174]
call fcn.1013e210
mov ecx, dword [ebp + 8]
mov edx, ebx
add esp, 4
mov edi, dword [ebp - 0x20]
movzx eax, byte [ebp + 0x14]
shl edx, 0x10
shl esi, 0x10
bswap edx
bswap esi
shl edi, 0x10
add eax, edx
bswap edi
add eax, esi
lea eax, [edi + eax + 9]
cmp eax, dword [ebp + 0x10]
jne 0x101658c9
lea eax, [edi - 0x10]
mov ebx, 0xffffd01c
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
mov eax, 0x2f
ja 0x10165660
mov eax, dword [ebp + 0xc]
lea edx, [ecx + 0x410]
sub edx, edi
add edx, 0x20
add eax, 9
add eax, dword [ebp - 0x1c]
add eax, esi
xor esi, esi
mov dword [ecx + 0x414], esi
mov dword [ecx + 0x410], esi
mov dword [ecx + 0x41c], esi
mov dword [ecx + 0x418], esi
mov dword [ecx + 0x424], esi
mov dword [ecx + 0x420], esi
mov dword [ecx + 0x42c], esi
mov dword [ecx + 0x428], esi
push edi
push eax
push edx
mov edi, ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, edi
call fcn.1015eb70
test eax, eax
je 0x10165a38
mov ecx, dword [ebp + 8]
movzx eax, word [ecx + 0x58]
lea edi, [ecx + esi*4 + 0x210]
mov word [ebp - 0x14], ax
mov word [ebp - 0x12], ax
mov eax, ecx
movzx edx, byte [ecx + 0x3e0]
mov ecx, edi
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1015ef80
add esp, 8
cmp dword [ebp - 0x1c], 3
jb 0x101658ad
test eax, eax
je 0x101658ad
movzx eax, word [edi]
mov edx, 5
mov word [ebp - 0x20], ax
movzx ecx, ax
mov eax, dword [ebp + 0xc]
movzx edi, byte [eax + edx + 4]
movzx ebx, byte [eax + edx + 5]
movzx eax, byte [eax + edx + 6]
shl edi, 0x10
shl ebx, 8
or ebx, edi
or eax, ebx
cmp eax, ecx
je 0x101658d8
cmp edx, dword [ebp - 0x1c]
jae 0x101658ad
add edx, 3
jmp 0x10165883
mov ecx, dword [ebp + 8]
inc esi
mov eax, 0x28
mov ebx, 0xffffd002
cmp esi, 0x47
jne 0x1016583f
jmp 0x10165660
mov ebx, 0xffffd01c
mov eax, 0x2f
jmp 0x10165660
mov ecx, dword [ebp + 8]
movzx eax, word [ebp - 0x20]
mov esi, dword [ebp + 0xc]
mov edx, 0x48
mov word [ecx + 0x490], ax
mov ecx, 0x101a7890
cmp word [ecx], ax
je 0x10165927
add ecx, 0x14
dec edx
jne 0x101658f3
xor esi, esi
push esi
push 0xffffd016
call sym.nss3.dll_PR_SetError
add esp, 8
mov eax, dword [ebp + 8]
mov dword [eax + 0x494], esi
push esi
push 0xffffe001
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10165957
mov edx, dword [ebp + 8]
mov dword [edx + 0x494], ecx
mov eax, dword [ecx + 0xc]
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x101a7e30]
mov dword [edx + 0x48c], eax
or byte [edx + 0x540], 2
push edx
call fcn.10161690
add esp, 4
test eax, eax
je 0x10165988
cmp dword [0x101d4d40], 0
je 0x10165b84
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10165b4b
mov ebx, dword [eax + 0x28]
mov ecx, dword [ebp + 8]
mov eax, 0x50
jmp 0x10165660
mov ecx, dword [ebp + 8]
movzx eax, word [ecx + 0x26]
cmp ax, word [ecx + 0x5a]
jbe 0x101659ba
mov eax, 5
movzx edx, word [esi + eax + 5]
shl edx, 0x10
bswap edx
cmp edx, 0x5600
je 0x10165a69
cmp eax, dword [ebp - 0x1c]
jae 0x101659ba
add eax, 3
jmp 0x1016599a
mov eax, 5
movzx ecx, byte [esi + eax + 4]
movzx edx, byte [esi + eax + 5]
movzx edi, byte [esi + eax + 6]
shl ecx, 0x10
shl edx, 8
or edx, ecx
or edi, edx
cmp edi, 0xff
je 0x101659ea
cmp eax, dword [ebp - 0x1c]
jae 0x10165a0c
add eax, 3
jmp 0x101659bf
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x101a8074
mov dword [eax], 5
push 1
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.10170820
add esp, 0x10
mov ecx, dword [ebp + 8]
cmp word [ecx + 0x1c], 0
jns 0x10165a2f
push 0xff01
push ecx
call fcn.10170340
mov ecx, dword [ebp + 8]
add esp, 8
test eax, eax
je 0x10165b17
call fcn.101650f0
test eax, eax
je 0x10165a78
cmp dword [0x101d4d40], 0
je 0x10165b8e
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10165b5f
mov ebx, dword [eax + 0x28]
mov ecx, dword [ebp + 8]
mov eax, 0x28
jmp 0x10165660
mov eax, 0x56
mov ebx, 0xffffd083
jmp 0x10165660
lock inc dword [0x101d617c]
push 1
push dword [ebp + 8]
call fcn.10163760
add esp, 8
test eax, eax
je 0x10165aef
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc4], eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
call fcn.10161960
add esp, 0x10
test eax, eax
jne 0x10165aef
mov eax, dword [ebp + 8]
test byte [eax + 0x1d], 4
jne 0x10165ac8
mov eax, dword [ebp + 8]
push dword [eax + 0x168]
call sym.nss3.dll_PR_EnterMonitor
add esp, 4
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.10165bb0
test byte [esi + 0x1d], 4
mov edi, eax
jne 0x10165aeb
mov eax, dword [ebp + 8]
push dword [eax + 0x168]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
test edi, edi
je 0x10165b26
cmp dword [0x101d4d40], 0
je 0x10165b98
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10165b73
mov ebx, dword [eax + 0x28]
mov ecx, dword [ebp + 8]
jmp 0x1016566f
mov eax, 0x28
mov ebx, 0xffffd071
jmp 0x10165660
mov eax, dword [ebp + 8]
xor edi, edi
test byte [eax + 0x1d], 4
jne 0x10165691
mov eax, dword [ebp + 8]
push dword [eax + 0x170]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
jmp 0x10165691
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x10165978
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x10165a59
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x10165b0c
call sym.nss3.dll_PR_Init
jmp 0x10165964
call sym.nss3.dll_PR_Init
jmp 0x10165a45
call sym.nss3.dll_PR_Init
jmp 0x10165afc