Function at 0x1012aa60
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 ebx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], 0
cmp dword [ebx + 0x30], 0
jne 0x1012aaa9
mov edi, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x1012ad8a
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 0x1012aad7
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x14], eax
mov al, 1
jmp 0x1012aad9
xor eax, eax
cmp dword [ebx + 0x30], 0
jne 0x1012aaee
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 - 0x1c], eax
jne 0x1012ab02
cmp dword [ebx + 0x30], 0
je 0x1012ab02
xor eax, eax
jmp 0x1012ab2d
mov ebx, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x1012ad74
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], esi
mov ebx, dword [ebp + 8]
mov al, 1
test edi, edi
je 0x1012abee
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax + 0x6a]
call dword [section..00cfg]
push esi
push ebx
mov ebx, dword [ebp + 8]
push edi
call ecx
add esp, 0xc
mov esi, eax
mov eax, dword [ebp - 0x20]
test esi, esi
jne 0x1012abf3
mov eax, dword [ebp + 0x14]
xor esi, esi
mov eax, dword [eax]
test esi, esi
lea eax, [eax*4 + 0x28]
je 0x1012ab94
test eax, eax
js 0x1012ac90
push eax
push esi
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
mov ebx, eax
test eax, eax
jne 0x1012aba7
jmp 0x1012ac90
push eax
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
mov ebx, eax
test eax, eax
je 0x1012acc0
mov eax, dword [ebp + 8]
mov esi, edi
mov edi, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [eax + 0x6e]
mov eax, dword [edi]
lea edi, [ebx + eax*4]
call dword [section..00cfg]
lea eax, [ebp - 0x18]
push eax
push 0xa
push edi
mov edi, esi
push esi
call ecx
add esp, 0x10
test eax, eax
jne 0x1012aca2
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x18]
mov esi, ebx
mov eax, dword [edx]
add eax, ecx
cmp ecx, 0xa
mov dword [edx], eax
je 0x1012ab6b
jmp 0x1012acc2
mov esi, 0xb3
test al, al
je 0x1012ac02
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp byte [ebp - 0x1c], 0
jne 0x1012ac5d
cmp dword [ebx + 0x30], 0
jne 0x1012ac3b
mov ebx, dword [ebx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x1012ada0
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 8], eax
mov ebx, dword [ebp + 8]
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 0x1012ac5d
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
push esi
call fcn.10115520
add esp, 4
push 0
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffff
xor esi, esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
push esi
jmp 0x1012acb7
push eax
call fcn.10115520
add esp, 4
push 0
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
xor ebx, ebx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [eax + 0x72]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
cmp byte [ebp - 0x20], 0
je 0x1012acea
mov eax, dword [ebp + 8]
push dword [eax + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp byte [ebp - 0x1c], 0
mov esi, ebx
jne 0x1012ad51
mov esi, dword [ebp + 8]
cmp dword [esi + 0x30], 0
jne 0x1012ad28
mov esi, dword [esi + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x1012adb7
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x1c]
mov dword [esi + 8], eax
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
cmp dword [esi + 0x30], 0
mov esi, ebx
jne 0x1012ad51
mov eax, dword [ebp + 8]
push dword [eax + 0x3c]
call sym.nss3.dll_PR_Unlock
mov esi, ebx
add esp, 4
mov eax, dword [ebp + 0x14]
test esi, esi
je 0x1012ac74
cmp dword [eax], 0
jne 0x1012ac7c
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
jmp 0x1012ac7a
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x1012ab1b
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov esi, eax
jmp 0x1012aa9c
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x1c], eax
jmp 0x1012ac28
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x1c], eax
jmp 0x1012ad15