Function at 0x10021f70
Capabilities:
Get system information on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov eax, dword [0x1007a00c]
xor eax, ebp
mov dword [esp + 0x68], eax
mov eax, dword [0x1007a708]
test eax, eax
je 0x100223e1
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, ecx
mul esi
seto al
jo 0x100225c3
imul esi, ecx
test al, al
jne 0x100225d8
test esi, esi
je 0x100223d7
cmp esi, 0x200
ja 0x100221e5
mov eax, dword [0x1007a2f0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x100223a4
cmp esi, 8
jbe 0x100222af
add esi, 0xf
and esi, 0xfffffff0
lea ebx, [ecx + esi*2]
add ebx, 0x50
mov dword [esp + 0x2c], esi
cmp byte [ecx + 0x3c], 0
mov dword [esp + 8], ecx
mov dword [esp + 0x1c], ebx
jne 0x100220c5
lea edi, [ecx + 0xc]
push edi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [esp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x100221c7
cmp dword [eax + 8], 0
je 0x100221c7
mov dword [esp + 0x10], edi
mov edx, dword [eax + 4]
mov edi, dword [eax + edx*4 + 0xc]
test edi, edi
mov dword [esp + 0x20], eax
je 0x1002222b
mov dword [esp + 0x18], edx
mov ebx, dword [ecx + 0x40]
test ebx, ebx
jne 0x10022144
bsf edx, edi
mov ebx, dword [esp + 0x18]
mov esi, ebx
shl esi, 5
or esi, edx
btc edi, edx
mov eax, dword [esp + 0x1c]
imul esi, dword [eax + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [esp + 0x20]
mov dword [edx + ebx*4 + 0xc], edi
add eax, edx
add esi, eax
mov edi, dword [esp + 0x10]
add dword [edx + 8], 0xffffffff
test esi, esi
je 0x100225d1
mov ebx, dword [esp + 0x2c]
add dword [ecx + 0x2c], ebx
push edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push ebx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test esi, esi
je 0x100225d8
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.1002cad0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [ecx + 0x40], 0
jne 0x1002200e
mov byte [ecx + 0x3c], 0
lea eax, [esp + 0x40]
push eax
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
lea edi, [esp + 0x30]
push edi
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
mov ecx, 0x10
call fcn.1000b180
xor edx, edx
cmp byte [edi + 8], 0
mov ecx, 0
mov edi, 0
je 0x10022111
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
cmp byte [esp + 0x48], 0
mov ebx, 0
je 0x10022125
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x40]
mov dword [eax], ebx
mov dword [eax + 4], edx
mov dword [eax + 8], edi
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 8]
mov dword [ecx + 0x40], eax
mov byte [ecx + 0x3c], 1
mov ebx, dword [esp + 0x1c]
jmp 0x1002200e
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 4], edx
shld edx, ecx, 0x17
mov esi, ecx
shl esi, 0x17
xor esi, ecx
mov eax, dword [ebx + 0xc]
xor edx, dword [esp + 4]
mov dword [esp + 0x14], edx
mov ecx, dword [ebx + 8]
mov dword [esp + 4], ecx
mov dword [ebx + 4], eax
shld edx, esi, 0xf
mov dword [esp + 0xc], edx
mov edx, dword [esp + 4]
xor esi, edx
mov ecx, eax
shr ecx, 0x1a
xor ecx, eax
shld eax, edx, 6
xor eax, esi
xor eax, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
xor ecx, edx
shr edx, 0x11
xor ecx, edx
mov edx, dword [esp + 4]
mov dword [ebx], edx
mov dword [ebx + 0xc], ecx
mov dword [ebx + 8], eax
add eax, edx
mov edx, edi
mov ecx, eax
ror edx, cl
test edx, edx
je 0x100221c0
bsf edx, edx
add edx, eax
and edx, 0x1f
mov ecx, dword [esp + 8]
jmp 0x10022059
mov edx, 0x20
jmp 0x100221b2
mov ecx, dword [esp + 8]
mov edx, ebx
call fcn.10017000
mov ecx, dword [esp + 8]
mov dword [ebx], eax
test eax, eax
jne 0x10022030
jmp 0x100225d1
mov ecx, dword [0x1007a724]
cmp esi, 0x801
jae 0x1002237b
mov edx, ecx
dec esi
je 0x100222ef
bsr ecx, esi
xor ecx, 0x1f
neg cl
xor esi, esi
inc esi
shl esi, cl
mov eax, esi
shr eax, 9
or eax, 1
bsr eax, eax
xor eax, 0x20
shl eax, 5
mov ecx, edx
lea ebx, [edx + eax]
add ebx, 0x50
jmp 0x10021ff8
mov ecx, dword [ebx + 0x14]
mov esi, edx
shl esi, 5
mov edi, edx
mov dword [esp + 0x14], edx
inc edx
cmp edx, ecx
jae 0x100225ca
mov edi, dword [esp + 0x14]
mov edi, dword [eax + edi*4 + 0x10]
add esi, 0x20
mov dword [esp + 4], edi
test edi, edi
je 0x10022233
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 8]
mov edi, dword [ecx + 0x40]
test edi, edi
jne 0x100222f9
mov eax, dword [esp + 4]
bsf edx, eax
mov edi, dword [esp + 0x10]
or esi, edx
btc eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
imul esi, dword [eax + 8]
mov eax, dword [eax + 0x18]
mov dword [esp + 8], eax
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov dword [edx + eax*4 + 0x10], ebx
mov eax, dword [esp + 8]
add eax, edx
add esi, eax
mov eax, dword [esp + 0x18]
mov dword [edx + 4], eax
jmp 0x10022082
mov edx, ecx
cmp esi, 2
jb 0x1002239d
mov ecx, 0x20
mov eax, 0x20
dec esi
je 0x100222cd
bsr eax, esi
xor eax, 0x1f
sub ecx, eax
xor eax, eax
inc eax
shl eax, cl
cmp eax, 8
mov esi, 8
cmova esi, eax
mov eax, esi
shr eax, 3
or eax, 1
bsr eax, eax
jmp 0x1002221b
mov ecx, 0x20
jmp 0x10022206
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0xc], edx
shld edx, eax, 0x17
mov ebx, eax
shl ebx, 0x17
xor ebx, eax
mov ecx, dword [edi + 0xc]
xor edx, dword [esp + 0xc]
mov dword [esp + 0x28], edx
mov eax, dword [edi + 8]
mov dword [esp + 0xc], eax
mov dword [edi + 4], ecx
shld edx, ebx, 0xf
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xc]
xor ebx, edx
mov eax, ecx
shr eax, 0x1a
xor eax, ecx
shld ecx, edx, 6
xor ecx, ebx
xor ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
xor eax, edx
shr edx, 0x11
xor eax, edx
mov edx, dword [esp + 0xc]
mov dword [edi], edx
mov dword [edi + 0xc], eax
mov dword [edi + 8], ecx
add ecx, edx
mov eax, dword [esp + 4]
mov edx, eax
ror edx, cl
test edx, edx
je 0x10022396
bsf edx, edx
mov edi, dword [esp + 0x10]
add edx, ecx
and edx, 0x1f
mov ecx, dword [esp + 8]
jmp 0x10022273
mov edx, esi
cmp esi, 0xfe000
ja 0x100223c6
push 1
call fcn.10018a40
add esp, 4
mov esi, eax
jmp 0x100220a8
mov edx, 0x20
jmp 0x10022369
xor ecx, ecx
jmp 0x100222cf
mov edx, dword [0x1007a724]
mov eax, dword [0x1007a2f0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov ecx, edx
mov dword [eax + 8], edx
jmp 0x10021fe3
push 1
push 0x100000
call fcn.10001700
add esp, 8
jmp 0x1002238f
mov esi, 1
jmp 0x10021fba
push 0x1007a734
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x1007a708]
test eax, eax
jne 0x100225b3
mov eax, dword [0x1007a73c]
mov ecx, dword [0x1007a2f0]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jle 0x1002244c
push 0x1007a73c
call fcn.1002d432
add esp, 4
cmp dword [0x1007a73c], 0xffffffff
jne 0x1002244c
lea esi, [esp + 0x40]
push esi
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [esi + 4]
mov dword [0x1007a738], eax
push 0x1007a73c
call fcn.1002d432
add esp, 4
mov eax, 0x1000
xor edx, edx
div dword [0x1007a738]
test edx, edx
jne 0x10022613
mov edi, 0x1007a740
push 0x40
push edi
push str.MALLOC_OPTIONS
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
cmove edi, eax
je 0x100224bb
mov al, byte [edi]
test al, al
je 0x100224bb
xor ebx, ebx
movsx ecx, al
add ecx, 0xffffffd0
cmp ecx, 9
jbe 0x1002265d
xor esi, esi
inc esi
dec esi
movsx ecx, al
cmp ecx, 0x72
jne 0x100225eb
mov byte [0x1007a674], 1
test esi, esi
je 0x100224b2
mov al, byte [edi + ebx]
jmp 0x10022495
mov al, byte [edi + ebx + 1]
inc ebx
test al, al
jne 0x10022483
mov dword [0x1007a6e8], 0
mov esi, 0x1388
mov edi, dword [sym.imp.kernel32.dll_InitializeCriticalSectionAndSpinCount]
push esi
push 0x1007a6ec
call edi
xor ebx, ebx
mov dword [0x1007a780], ebx
mov dword [0x1007a704], ebx
push esi
push 0x1007a678
call edi
mov dword [0x1007a690], ebx
mov dword [0x1007a694], ebx
mov dword [0x1007a698], ebx
mov dword [0x1007a6e4], ebx
mov dword [0x1007a6dc], ebx
push esi
push 0x1007a6b8
call edi
mov dword [0x1007a72c], ebx
mov dword [0x1007a730], ebx
mov dword [esp + 0x44], ebx
mov eax, dword [0x1007a024]
mov dword [esp + 0x40], eax
push esi
push 0x1007a70c
call edi
test eax, eax
je 0x10022637
lea edx, [esp + 0x40]
xor ecx, ecx
call fcn.10021bf0
mov dword [0x1007a724], eax
test eax, eax
je 0x1002264d
mov ecx, dword [0x1007a2f0]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 8], eax
push 0x1388
push 0x1007a69c
call dword [sym.imp.kernel32.dll_InitializeCriticalSectionAndSpinCount]
mov ecx, 0x4000
call fcn.1000b180
test eax, eax
je 0x10022643
mov esi, eax
push 0x4000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x1007a6b4], esi
xor eax, eax
inc eax
xchg dword [0x1007a708], eax
call fcn.100016e0
push 0x1007a734
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x10021f94
xor esi, esi
jmp 0x10021faa
dec dword [eax + 8]
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0xc
xor esi, esi
jmp 0x100220b0
cmp ecx, 0x46
jne 0x10022682
mov eax, dword [0x1007a024]
test eax, eax
je 0x100226a3
add eax, eax
je 0x100224a9
mov dword [0x1007a024], eax
jmp 0x100224a9
mov ecx, str._jemalloc_
mov edx, str.Compile_time_page_size_does_not_divide_the_runtime_one._n
call fcn.10030280
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_CRASH__
int3
mov dword [0x1007a724], 0
jmp 0x1002264d
mov dword [0x1007a6b4], 0
push 0x1007a734
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x100225d8
xor esi, esi
lea eax, [esi + esi*4]
lea esi, [ecx + eax*2]
movsx eax, byte [edi + ebx + 1]
inc ebx
mov ecx, eax
add ecx, 0xffffffd0
cmp ecx, 0xa
jb 0x1002265f
test esi, esi
je 0x100224b2
jmp 0x10022495
cmp ecx, 0x52
jne 0x10022693
mov byte [0x1007a674], 0
jmp 0x100224a9
cmp ecx, 0x66
jne 0x100226b2
shr dword [0x1007a024], 1
jmp 0x100224a9
mov dword [0x1007a024], 1
jmp 0x100224a9
lea ecx, [esp + 0x40]
mov byte [ecx], al
mov byte [ecx + 1], 0
mov eax, 2
push 0xa
push str._jemalloc_
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
add esp, 0xc
push 0x35
push str.:__malloc__Unsupported_character_in_malloc_options:_
mov eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
add esp, 0xc
lea ecx, [esp + 0x40]
mov edx, 0x10071020
call fcn.10030280
jmp 0x100224a9