Function at 0x1017b170
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 esi, dword [ebp + 8]
xor eax, ebp
test esi, esi
mov dword [ebp - 0x10], eax
je 0x1017b358
cmp dword [0x101d4d40], 0
je 0x1017b384
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1017b370
mov eax, dword [eax + 0x28]
movzx ecx, byte [esi + 0x78]
mov edx, esi
mov esi, 0x20
lea ebx, [edx + 0x79]
mov dword [ebp - 0x48], eax
mov eax, 0x20
mov dword [ebp - 0x34], ecx
cmp ecx, eax
cmovb esi, ecx
xor ecx, ecx
sub eax, esi
cmp esi, 0x1f
cmova eax, ecx
lea ecx, [ebp + esi - 0x30]
push eax
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea edi, [ebp - 0x30]
push esi
mov dword [ebp - 0x44], ebx
push ebx
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp + 8]
xor edx, edx
mov eax, dword [ecx + 0x3c]
xor eax, dword [ecx + 0x38]
xor eax, dword [ecx + 0x40]
xor eax, dword [ecx + 0x44]
xor eax, dword [edi]
xor eax, dword [edi + 4]
xor eax, dword [edi + 8]
xor eax, dword [edi + 0xc]
xor eax, dword [edi + 0x10]
xor eax, dword [edi + 0x14]
xor eax, dword [edi + 0x18]
xor eax, dword [edi + 0x1c]
div dword [0x101d6644]
mov edi, edx
mov eax, edx
xor edx, edx
div dword [0x101d6640]
mov esi, dword [0x101d6680]
mov ebx, edx
shl ebx, 4
lea eax, [esi + ebx + 4]
push eax
call fcn.101771c0
add esp, 4
test eax, eax
jne 0x1017b341
call sym.nss3.dll_PR_Now
push 0
push 0xf4240
push edx
push eax
call fcn.10193120
mov dword [esi + ebx], eax
mov edx, eax
mov eax, dword [0x101d66cc]
test edx, edx
mov dword [esi + ebx + 0xc], eax
je 0x1017b341
imul ecx, edi, 0x6800
mov eax, dword [0x101d6690]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], edx
add ecx, dword [0x101d6694]
mov ebx, dword [eax + edi*4]
mov edi, 0x81
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
dec ebx
and ebx, 0x7f
imul esi, ebx, 0xd0
cmp byte [eax + esi + 0x2a], 0
je 0x1017b305
add esi, dword [ebp - 0x38]
mov eax, dword [esi + 0x24]
cmp dword [esi + 0x20], edx
sbb eax, 0
jge 0x1017b2cb
mov byte [esi + 0x2a], 0
jmp 0x1017b305
cmp byte [esi + 0x2b], cl
jne 0x1017b305
mov eax, dword [ebp + 8]
movdqu xmm0, xmmword [esi]
movdqu xmm1, xmmword [eax + 0x38]
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
cmp eax, 0xffff
jne 0x1017b305
lea eax, [esi + 0x2c]
push ecx
push dword [ebp - 0x44]
push eax
call sub.VCRUNTIME140.dll_memcmp
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x34]
add esp, 0xc
test eax, eax
je 0x1017b36a
dec edi
cmp edi, 1
ja 0x1017b2a3
push 0
push 0xffffd05a
call sym.nss3.dll_PR_SetError
add esp, 8
mov eax, dword [ebp - 0x3c]
xor edx, edx
div dword [0x101d6640]
mov eax, dword [0x101d6680]
shl edx, 4
lea eax, [eax + edx + 4]
mov dword [eax + 8], 0
push eax
call fcn.10177150
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 4], 3
push 0
push dword [ebp - 0x48]
call sym.nss3.dll_PR_SetError
add esp, 8
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [esi + 0x2a], 0
jmp 0x1017b31a
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x1017b1af
call sym.nss3.dll_PR_Init
jmp 0x1017b19b