Function at 0x10137be0
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov eax, dword [0x101d2014]
mov ebx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ebx + 0x30], 0
jne 0x10137c22
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x101383e2
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], esi
mov eax, dword [ebx]
mov esi, dword [ebx + 0x40]
lea edi, [ebx + 0x140]
mov ecx, dword [eax + 0x1a]
call dword [section..00cfg]
push edi
push esi
call ecx
add esp, 8
cmp dword [ebx + 0x30], 0
mov esi, eax
jne 0x10137c50
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
test esi, esi
je 0x10137c7f
push esi
call fcn.10115520
add esp, 4
push 0
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
xor esi, esi
dec esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, esi
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
inc word [ebx + 0x80]
mov eax, dword [ebx + 0x1a0]
mov ecx, eax
mov esi, eax
mov edx, eax
mov dword [ebx + 0x34], eax
shr eax, 8
shr ecx, 2
shr esi, 1
and edx, 1
and eax, 1
and ecx, 1
and esi, 1
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x20], esi
mov dword [ebx + 0x28], edx
mov dword [ebx + 0x12c], eax
xor eax, eax
mov dword [ebx + 0x134], eax
mov dword [ebx + 0x138], eax
cmp dword [ebx + 0x130], eax
je 0x10137cd8
mov dword [ebx + 0x12c], 0
lea eax, [ebx + 0xf9]
mov ecx, 0x119
mov esi, ecx
cmp ecx, 0xf9
je 0x10137d08
cmp byte [ebx + esi + 0x46], 0x20
lea ecx, [esi - 1]
je 0x10137ce3
add ecx, 0xffffff08
push ecx
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [ebx + esi], 0
mov eax, dword [ebx + 0x1b8]
mov dword [ebx + 0x78], eax
mov eax, dword [ebx + 0x1b4]
mov dword [ebx + 0x7c], eax
movsd xmm0, qword [ebx + 0x190]
movsd qword [ebx + 0xa8], xmm0
movsd xmm0, qword [ebx + 0x198]
movsd qword [ebx + 0xb0], xmm0
push dword [ebx + 0x13c]
call fcn.1010c150
add esp, 4
cmp dword [ebx + 0x20], 0
je 0x10137d56
xor eax, eax
jmp 0x10137d60
cmp dword [ebx + 0x1a4], 1
sete al
movzx eax, al
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x10137d84
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [ebx + 0x94], 0
mov dword [ebx + 0x98], 0
cmp dword [ebx + 0x30], 0
jne 0x10137dba
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x101383f8
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], esi
mov eax, dword [ebx]
mov esi, dword [ebx + 0x40]
mov ecx, dword [eax + 0x1e]
call dword [section..00cfg]
lea eax, [ebp - 0x30]
push eax
push 0
push esi
call ecx
add esp, 0xc
test eax, eax
je 0x10137df4
cmp dword [ebx + 0x30], 0
mov esi, eax
jne 0x10137c54
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
jmp 0x10137c54
mov eax, dword [ebp - 0x30]
shl eax, 2
push eax
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
test eax, eax
mov dword [ebx + 0x94], eax
je 0x10137e70
mov ecx, dword [ebx]
mov edi, dword [ebx + 0x40]
mov esi, eax
mov ecx, dword [ecx + 0x1e]
call dword [section..00cfg]
lea eax, [ebp - 0x30]
push eax
push esi
push edi
call ecx
add esp, 0xc
cmp dword [ebx + 0x30], 0
mov esi, eax
jne 0x10137e3b
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
test esi, esi
je 0x10137e7f
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x10137e53
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
xor edi, edi
mov dword [ebx + 0x94], edi
push esi
call fcn.10115520
add esp, 4
push edi
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10137ed1
cmp dword [ebx + 0x30], 0
jne 0x10137c68
jmp 0x10137fd5
mov esi, dword [ebp - 0x30]
lea eax, [ebx + 0x1e0]
mov dword [ebx + 0x98], esi
push 0x100
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test esi, esi
je 0x10137ed1
mov eax, dword [ebx + 0x94]
xor edi, edi
inc edi
mov edx, dword [eax]
cmp edx, 0x7fe
ja 0x10137ecb
mov ebx, edi
mov cl, dh
shl ebx, cl
movzx ecx, dl
mov edx, dword [ebp + 8]
or byte [edx + ecx + 0x1e0], bl
mov ebx, dword [ebp + 8]
add eax, 4
dec esi
jne 0x10137eab
xor eax, eax
mov edi, 0x320
mov dword [ebx + 0x124], eax
mov dword [ebx + 0x128], eax
mov ecx, dword [ebx + 0x1a4]
mov esi, dword [ebx + 0x38]
mov edx, ecx
shr edx, 1
cmp ecx, 0x14
cmovb edx, eax
test ecx, ecx
lea ecx, [ebx + 0x38]
cmovne edi, edx
test esi, esi
mov dword [ebp - 0x44], ecx
mov dword [ebx + 0x5c], edi
je 0x10137fe5
cmp dword [ebx + 0x30], 0
jne 0x10137f3e
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x1013840e
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x44]
mov dword [edi + 8], esi
mov esi, dword [eax]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x3e]
call dword [section..00cfg]
lea edi, [ebp - 0x30]
push edi
push esi
call ecx
add esp, 8
cmp eax, 0xb3
je 0x10137f7e
cmp eax, 0xb0
je 0x10137f7e
cmp eax, 0x30
jne 0x10138065
mov eax, dword [ebx]
mov esi, dword [ebx + 0x38]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
mov eax, dword [ebx]
mov esi, dword [ebx + 0x40]
mov ecx, dword [eax + 0x32]
xor eax, eax
cmp dword [ebx + 0x2c], 0
setne al
lea edi, [eax + eax + 4]
call dword [section..00cfg]
push dword [ebp - 0x44]
push sym.nss3.dll_PR_DuplicateEnvironment
push ebx
push edi
lea edi, [ebp - 0x30]
push esi
call ecx
add esp, 0x14
test eax, eax
je 0x10138065
push eax
call fcn.10115520
add esp, 4
xor esi, esi
push esi
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
mov dword [ebx + 0x38], esi
cmp dword [ebx + 0x30], esi
jne 0x10137c68
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
jmp 0x10137c68
cmp dword [ebx + 0x30], 0
jne 0x10138011
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x10138424
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], esi
mov eax, dword [ebx]
mov esi, dword [ebx + 0x40]
mov ecx, dword [eax + 0x32]
xor eax, eax
cmp dword [ebx + 0x2c], 0
setne al
lea edi, [eax + eax + 4]
call dword [section..00cfg]
lea eax, [ebp - 0x30]
push eax
push sym.nss3.dll_PR_DuplicateEnvironment
push ebx
push edi
push esi
call ecx
add esp, 0x14
cmp dword [ebx + 0x30], 0
mov esi, eax
jne 0x10138050
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
test esi, esi
jne 0x10137c54
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x44]
lea edi, [ebp - 0x30]
mov dword [ecx], eax
jmp 0x10138076
cmp dword [ebx + 0x30], 0
jne 0x10138076
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
push dword [ebx + 0x13c]
call fcn.1010c1a0
add esp, 4
test eax, eax
jne 0x10137c68
xor ecx, ecx
lea eax, [ebp - 0x31]
lea edx, [ebp - 0x38]
inc ecx
mov byte [eax], 1
mov dword [edx], 9
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], 4
mov eax, dword [ebx + 0x2e0]
test eax, eax
je 0x101380d6
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [ebx + 0x2e0], 0
xor eax, eax
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x2e4], eax
mov dword [ecx], eax
push ecx
push 2
push edi
push ebx
call fcn.1012aa60
add esp, 0x10
test eax, eax
mov dword [ebp - 0x44], eax
je 0x10138161
mov eax, dword [ebp - 0x3c]
shl eax, 2
push eax
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
test eax, eax
mov dword [ebx + 0x2e0], eax
je 0x10138155
cmp dword [ebp - 0x3c], 0
jle 0x10138155
xor edi, edi
push 0x601
mov eax, dword [ebp - 0x44]
push dword [eax + edi*4]
push ebx
call fcn.101277a0
add esp, 0xc
cmp eax, 0xffffffff
je 0x1013814f
mov edx, dword [ebx + 0x2e4]
mov esi, dword [ebp + 8]
mov ecx, dword [ebx + 0x2e0]
lea ebx, [edx + 1]
mov dword [esi + 0x2e4], ebx
mov ebx, dword [ebp + 8]
mov dword [ecx + edx*4], eax
inc edi
cmp edi, dword [ebp - 0x3c]
jl 0x10138118
push dword [ebp - 0x44]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
cmp dword [ebx + 0x14], 0
je 0x101381b5
xor esi, esi
cmp dword [ebx + 0x20], 0
jne 0x10137c6b
mov dword [ebp - 0x38], 0
mov eax, dword [ebx]
mov edi, dword [ebx + 0x40]
mov ecx, dword [eax + 0x32]
call dword [section..00cfg]
lea eax, [ebp - 0x38]
push eax
push sym.nss3.dll_PR_DuplicateEnvironment
push ebx
push 6
push edi
call ecx
add esp, 0x14
test eax, eax
je 0x101381e4
cmp eax, 0xe2
jne 0x10137c6b
mov dword [ebx + 0x20], 1
jmp 0x10137c6b
xor esi, esi
cmp dword [ebx + 0x28], 0
je 0x10137c6b
mov eax, dword [0x101d5b4c]
test eax, eax
je 0x101383c4
cmp dword [eax + 0xc], 0
je 0x10138226
mov ecx, dword [0x101d5b40]
test ecx, ecx
je 0x10138226
lock inc dword [ecx + 0x48]
jmp 0x10138237
mov eax, dword [ebx]
mov edi, dword [ebp - 0x38]
mov ecx, dword [eax + 0x3e]
call dword [section..00cfg]
lea eax, [ebp - 0x30]
push eax
push edi
call ecx
add esp, 8
test eax, eax
jne 0x1013820d
test byte [ebp - 0x28], 2
jne 0x1013820d
mov dword [ebx + 0x20], 1
mov eax, dword [ebx]
mov edi, dword [ebp - 0x38]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
jmp 0x10137c6b
mov eax, dword [eax + 0x28]
mov ecx, dword [eax]
lock inc dword [ecx + 0x48]
test ecx, ecx
je 0x101383d3
mov edi, dword [ebx + 0x3c]
mov dword [ebp - 0x44], ecx
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x1013843a
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x40]
mov dword [edi + 8], eax
mov eax, dword [ebx]
mov edi, dword [ebx + 0x38]
mov ecx, dword [eax + 0x102]
call dword [section..00cfg]
push 0x20
lea eax, [ebp - 0x30]
push eax
push edi
call ecx
add esp, 0xc
mov edi, eax
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
test edi, edi
mov edi, dword [ebp - 0x44]
jne 0x101382f5
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x48], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x10138468
mov edi, dword [ebp - 0x48]
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x40]
mov dword [edi + 8], eax
mov edi, dword [ebp - 0x44]
mov ecx, dword [edi + 0x38]
mov eax, dword [edi]
mov dword [ebp - 0x40], ecx
mov ecx, dword [eax + 0xfe]
call dword [section..00cfg]
push 0x20
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x40]
call ecx
add esp, 0xc
push dword [edi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x48], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x10138451
mov edi, dword [ebp - 0x48]
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x40]
mov dword [edi + 8], eax
mov edi, dword [ebp - 0x44]
mov ecx, dword [edi + 0x38]
mov eax, dword [edi]
mov dword [ebp - 0x40], ecx
mov ecx, dword [eax + 0x102]
call dword [section..00cfg]
push 0x20
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x40]
call ecx
add esp, 0xc
mov dword [ebp - 0x40], eax
push dword [edi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp dword [ebp - 0x40], 0
jne 0x101383b3
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x1013847f
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x40]
mov dword [edi + 8], eax
mov eax, dword [ebx]
mov edi, dword [ebx + 0x38]
mov ecx, dword [eax + 0xfe]
call dword [section..00cfg]
push 0x20
lea eax, [ebp - 0x30]
push eax
push edi
call ecx
add esp, 0xc
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov edi, dword [ebp - 0x44]
lock dec dword [edi + 0x48]
jne 0x101383d3
push edi
call fcn.10135de0
add esp, 4
jmp 0x101383d3
push 0
push 0xffffe040
call sym.nss3.dll_PR_SetError
add esp, 8
cmp dword [ebx + 0x14], 0
jne 0x10138167
jmp 0x10137c6b
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x10137c15
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x10137dad
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x10137f2c
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x10138004
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x40], eax
jmp 0x10138254
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x40], eax
jmp 0x10138312
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x40], eax
jmp 0x101382b2
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x40], eax
jmp 0x10138378