Function at 0x10129170
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov edx, dword [0x101d2014]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
xor edx, ebp
mov dword [ebp - 0x10], edx
xor edx, edx
test eax, eax
mov ebx, dword [esi + 8]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], ecx
je 0x101291ab
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x30], 0
jne 0x101291d7
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x101293fc
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]
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push eax
push sym.nss3.dll_PR_DuplicateEnvironment
push ebx
push 4
push esi
call ecx
add esp, 0x14
test eax, eax
je 0x10129205
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x14], eax
mov al, 1
jmp 0x10129207
xor eax, eax
cmp dword [ebx + 0x30], 0
jne 0x1012921c
push dword [ebx + 0x3c]
mov esi, eax
call sym.nss3.dll_PR_Unlock
mov eax, esi
add esp, 4
mov edi, dword [ebp - 0x14]
test al, al
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edi
jne 0x10129238
cmp dword [ebx + 0x30], 0
je 0x10129238
mov dword [ebp - 0x2c], 0
jmp 0x10129266
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x101293e6
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], esi
mov edi, dword [ebp - 0x28]
mov al, 1
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx]
mov edx, dword [ebp + 8]
mov ecx, dword [eax + 0xaa]
mov esi, dword [edx + 4]
call dword [section..00cfg]
lea eax, [ebp - 0x20]
push esi
push eax
push edi
call ecx
add esp, 0xc
test eax, eax
je 0x10129304
cmp byte [ebp - 0x2c], 0
mov esi, eax
je 0x1012929c
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp byte [ebp - 0x24], 0
jne 0x101293b7
cmp dword [ebx + 0x30], 0
jne 0x101292d9
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x10129412
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x24]
mov dword [edi + 8], eax
mov edi, dword [ebp - 0x28]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
cmp dword [ebx + 0x30], 0
jne 0x101293b7
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
jmp 0x101293b7
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov ecx, dword [edx + 8]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx]
mov esi, dword [edx + 4]
mov edx, dword [eax + 4]
mov edi, dword [eax + 8]
mov ecx, dword [ecx + 0xae]
mov dword [ebp - 0x30], edx
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push eax
push esi
push edi
mov edi, dword [ebp - 0x28]
push dword [ebp - 0x30]
push edi
call ecx
add esp, 0x14
cmp byte [ebp - 0x2c], 0
mov esi, eax
je 0x1012934f
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp byte [ebp - 0x24], 0
jne 0x101293aa
cmp dword [ebx + 0x30], 0
jne 0x10129388
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x10129429
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x24]
mov dword [edi + 8], eax
mov edi, dword [ebp - 0x28]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
cmp dword [ebx + 0x30], 0
jne 0x101293aa
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x14]
test esi, esi
mov dword [ecx + 8], eax
je 0x101293e2
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, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
jmp 0x101293ce
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x10129251
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x101291ca
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x24], eax
jmp 0x101292c6
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x24], eax
jmp 0x10129375