Function at 0x10021f50
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x1007d00c]
xor eax, ebp
mov dword [esp + 0x98], eax
test ecx, ecx
jne 0x10022277
cmp byte [0x1007e548], 0
jne 0x10021fc0
mov eax, dword [0x1007e53c]
or eax, dword [0x1007e538]
je 0x10021fc0
movsd xmm0, qword [0x1007e548]
movsd qword [esi + 0x10], xmm0
movups xmm0, xmmword [0x1007e538]
movups xmmword [esi], xmm0
mov ecx, dword [esp + 0x98]
xor ecx, ebp
call fcn.1002f5c0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push str.MOZ_APP_RESTART
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
mov word [esp + 0x60], 1
test eax, eax
jne 0x1002227f
lea eax, [esp + 0x38]
push 1
push eax
call sym.mozglue.dll_private:_static_class_mozilla::TimeStamp___cdecl_mozilla::TimeStamp::Now_bool_
add esp, 8
call sym.mozglue.dll_private:_static_unsigned_long_long_unsigned___int64____cdecl_mozilla::TimeStamp::ComputeProcessUptime_void_
mov dword [esp + 0x30], edx
movd xmm0, edx
mov dword [esp + 0x34], eax
movd xmm1, eax
punpckldq xmm1, xmm0
punpckldq xmm1, xmmword [0x1006d270]
subpd xmm1, xmmword [0x1006d280]
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
divsd xmm0, qword [0x1006d2b0]
ucomisd xmm0, qword [0x1006d2a0]
jae 0x100222a7
sub esp, 8
movsd qword [esp], xmm0
call sym.mozglue.dll_public:_static_long_long___int64____cdecl_mozilla::BaseTimeDurationPlatformUtils::TicksFromMilliseconds_double_
add esp, 8
mov esi, edx
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov cl, byte [esp + 0x49]
mov ebx, dword [esp + 0x4a]
mov dword [esp + 0x90], ebx
movzx ebx, word [esp + 0x4e]
mov word [esp + 0x94], bx
xor ebx, ebx
mov byte [esp + 0x1b], cl
test cl, cl
setne bl
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], edx
sub edx, eax
mov dword [esp + 0x24], edi
sbb edi, esi
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ebx
sub ebx, eax
mov eax, dword [esp + 0x3c]
mov ecx, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x28], eax
mov esi, eax
sbb esi, ecx
mov al, byte [esp + 0x48]
mov byte [esp + 0x1c], al
lea ecx, [esp + 0x70]
push dword [esp + 0x14]
push edi
push edx
push esi
push ebx
call sym.mozglue.dll_private:_void___thiscall_mozilla::TimeStampValue::constructor_unsigned_long_long_unsigned___int64___unsigned_long_long_unsigned___int64___bool_
cmp dword [esp + 0x10], 1
sbb dword [esp + 0xc], 0
jl 0x100222e8
cmp byte [esp + 0x1c], 0
je 0x100220ee
cmp byte [esp + 0x80], 0
jne 0x100222e8
mov ebx, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
sub ebx, dword [esp + 0x2c]
sbb edi, dword [esp + 0x28]
cmp byte [esp + 0x1b], 0
je 0x100222d8
cmp byte [esp + 0x81], 0
je 0x100222d8
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
sub eax, dword [esp + 0x20]
sbb ecx, dword [esp + 0x24]
cmp byte [0x1007e550], 0
jne 0x100222dc
mov esi, eax
sub esi, ebx
mov edx, ecx
sbb edx, edi
mov dword [esp + 0xc], edx
sar dword [esp + 0xc], 0x1f
add esi, dword [esp + 0xc]
adc edx, dword [esp + 0xc]
xor edx, dword [esp + 0xc]
xor esi, dword [esp + 0xc]
mov dword [esp + 0xc], esi
mov esi, dword [0x1007e55c]
mov dword [esp + 0x10], esi
mov esi, dword [0x1007e558]
mov dword [esp + 0x1c], esi
cmp esi, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
sbb esi, edx
jge 0x100222dc
mov edx, dword [esp + 0xc]
sub edx, dword [esp + 0x1c]
mov dword [esp + 0xc], edx
mov esi, dword [esp + 0x14]
sbb esi, dword [esp + 0x10]
mov edx, dword [0x1007e564]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xc]
cmp dword [0x1007e560], edx
sbb dword [esp + 0x10], esi
jge 0x100222dc
mov eax, edi
sar eax, 0x1f
mov esi, ebx
add esi, eax
mov ecx, edi
adc ecx, eax
mov dl, byte [0x1007d210]
test dl, 1
je 0x100222d8
xor esi, eax
xor ecx, eax
cmp esi, dword [0x1007e568]
sbb ecx, dword [0x1007e56c]
jge 0x100222d8
call dword [sym.imp.kernel32.dll_GetTickCount64]
mov esi, eax
mov ecx, edx
mov eax, dword [0x1007d208]
imul ecx, eax
mul esi
mov dword [esp + 0xc], eax
add edx, ecx
imul esi, dword [0x1007d20c]
add esi, edx
push 0x1007e570
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [0x1007e58c]
mov eax, dword [0x1007e588]
cmp dword [esp + 0xc], eax
mov edx, esi
sbb edx, ecx
mov edx, dword [0x1007e594]
mov dword [esp + 0x14], edx
mov edx, dword [0x1007e590]
mov dword [esp + 0x10], edx
jae 0x100222b4
mov edx, dword [esp + 0xc]
not edx
add eax, edx
mov edx, esi
not edx
adc ecx, edx
add eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
adc ecx, edx
push edx
push dword [esp + 0x14]
push ecx
push eax
call fcn.100303d0
mov ecx, edx
cmp eax, 5
sbb edx, 0
jb 0x10022395
mov byte [0x1007d210], 0
jmp 0x100222cd
mov byte [ecx], 0
jmp 0x10021f7b
cmp byte [eax], 0
je 0x10021fe5
movsd xmm0, qword [0x1007e530]
movsd qword [esp + 0x60], xmm0
movups xmm0, xmmword [0x1007e520]
movaps xmmword [esp + 0x50], xmm0
jmp 0x10022335
mov esi, 0x7fffffff
xor eax, eax
dec eax
jmp 0x10022051
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
adc ecx, esi
mov dword [0x1007e588], eax
mov dword [0x1007e58c], ecx
push 0x1007e570
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, ebx
mov ecx, edi
cmp eax, 1
sbb ecx, 0
jge 0x1002237c
movaps xmm0, xmmword [esp + 0x70]
movzx eax, word [esp + 0x80]
movzx edx, word [esp + 0x86]
mov esi, dword [esp + 0x82]
lea ecx, [esp + 0x50]
movaps xmmword [ecx], xmm0
mov word [ecx + 0x10], ax
mov dword [ecx + 0x12], esi
mov word [ecx + 0x16], dx
push 0x1007e520
call sym.mozglue.dll_public:_unsigned_long_long_unsigned___int64____thiscall_mozilla::TimeStampValue::operator__class_mozilla::TimeStampValue_const__const
mov ecx, dword [esp + 0x30]
or dword [esp + 0x34], ecx
je 0x10022354
cmp eax, 1
sbb edx, 0
jge 0x10022354
mov esi, dword [ebp + 8]
movsd xmm0, qword [esp + 0x60]
movsd qword [0x1007e548], xmm0
movaps xmm0, xmmword [esp + 0x50]
movups xmmword [0x1007e538], xmm0
jmp 0x10021f91
cmp dword [ebp + 0xc], 0
je 0x10022360
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
movsd xmm0, qword [0x1007e530]
movsd qword [esp + 0x60], xmm0
movups xmm0, xmmword [0x1007e520]
movaps xmmword [esp + 0x50], xmm0
jmp 0x10022332
xorpd xmm0, xmm0
movapd xmmword [esp + 0x70], xmm0
mov word [esp + 0x80], 1
jmp 0x100222e8
add eax, 1
adc ecx, 0
mov edx, dword [esp + 0x14]
imul edx, eax
mov dword [esp + 0x14], edx
mul dword [esp + 0x10]
add edx, dword [esp + 0x14]
imul ecx, dword [esp + 0x10]
add ecx, edx
add eax, dword [esp + 0xc]
jmp 0x100222c0