Function at 0x10022bb0
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 edi, dword [ebp + 8]
mov eax, dword [0x1007d00c]
xor eax, ebp
mov dword [esp + 0x68], eax
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ebx, eax
mov eax, dword [0x1007d740]
test eax, eax
mov dword [esp + 0x10], ebx
je 0x10023020
lea edx, [ebx + 1]
xor esi, esi
inc esi
test edx, edx
cmove edx, esi
cmp edx, 0x200
ja 0x10022e04
mov eax, dword [0x1007d328]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10022fe6
cmp edx, 8
jbe 0x10022ee7
add edx, 0xf
and edx, 0xfffffff0
lea edi, [ecx + edx*2]
add edi, 0x50
mov dword [esp + 0x2c], edx
cmp byte [ecx + 0x3c], 0
mov dword [esp + 4], ecx
mov dword [esp + 0x1c], edi
jne 0x10022cf7
lea eax, [ecx + 0xc]
mov dword [esp + 0x20], eax
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [esp + 4]
mov eax, dword [edi]
test eax, eax
je 0x10022e4b
cmp dword [eax + 8], 0
je 0x10022e4b
mov edx, dword [eax + 4]
mov ebx, dword [eax + edx*4 + 0xc]
test ebx, ebx
je 0x10022e69
mov esi, dword [ecx + 0x40]
test esi, esi
jne 0x10022d76
bsf edi, ebx
mov esi, edx
shl esi, 5
or esi, edi
btc ebx, edi
mov edi, edx
mov edx, dword [esp + 0x1c]
imul esi, dword [edx + 8]
mov edx, dword [edx + 0x18]
mov dword [eax + edi*4 + 0xc], ebx
add edx, eax
add esi, edx
mov ebx, dword [esp + 0x10]
dec dword [eax + 8]
test esi, esi
mov edi, dword [ebp + 8]
je 0x1002320c
mov eax, dword [esp + 0x2c]
add dword [ecx + 0x2c], eax
push dword [esp + 0x20]
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
test esi, esi
je 0x10023216
push ebx
push edi
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov byte [esi + ebx], 0
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.1002f5c0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [ecx + 0x40], 0
jne 0x10022c45
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 esi, [esp + 0x30]
push esi
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
mov ecx, 0x10
call fcn.1000bb80
xor edx, edx
cmp byte [esi + 8], 0
mov ecx, 0
mov esi, 0
je 0x10022d43
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
cmp byte [esp + 0x48], 0
mov edi, 0
je 0x10022d57
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov dword [eax], edi
mov dword [eax + 4], edx
mov dword [eax + 8], esi
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 4]
mov dword [ecx + 0x40], eax
mov byte [ecx + 0x3c], 1
mov edi, dword [esp + 0x1c]
jmp 0x10022c45
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], eax
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp], edi
shld edi, ecx, 0x17
mov eax, ecx
shl eax, 0x17
xor eax, ecx
mov edx, dword [esi + 0xc]
xor edi, dword [esp]
mov dword [esp + 0x18], edi
mov ecx, dword [esi + 8]
mov dword [esp], ecx
mov dword [esi + 4], edx
shld edi, eax, 0xf
mov dword [esp + 8], edi
mov edi, dword [esp]
xor eax, edi
mov ecx, edx
shr ecx, 0x1a
xor ecx, edx
shld edx, edi, 6
xor edx, eax
xor edx, dword [esp + 8]
mov edi, dword [esp + 0x18]
xor ecx, edi
shr edi, 0x11
xor ecx, edi
mov eax, dword [esp]
mov dword [esi], eax
mov dword [esi + 0xc], ecx
mov dword [esi + 8], edx
add edx, eax
mov esi, ebx
mov ecx, edx
ror esi, cl
test esi, esi
je 0x10022dfd
bsf edi, esi
add edi, edx
and edi, 0x1f
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
jmp 0x10022c88
mov edi, 0x20
jmp 0x10022de7
mov ecx, dword [0x1007d75c]
cmp edx, 0x801
jae 0x10022f28
mov eax, esi
mov esi, ecx
dec edx
je 0x10022f45
bsr ecx, edx
xor ecx, 0x1f
neg cl
mov edx, eax
shl edx, cl
mov eax, edx
shr eax, 9
or eax, 1
bsr eax, eax
xor eax, 0x20
shl eax, 5
mov ecx, esi
lea edi, [esi + eax]
add edi, 0x50
jmp 0x10022c2f
mov ecx, dword [esp + 4]
mov edx, edi
call fcn.1001b770
mov ecx, dword [esp + 4]
mov dword [edi], eax
test eax, eax
jne 0x10022c6b
jmp 0x1002320c
mov ecx, dword [edi + 0x14]
mov dword [esp + 0xc], ecx
mov esi, edx
shl esi, 5
mov ebx, edx
inc edx
cmp edx, dword [esp + 0xc]
jae 0x10023209
mov ecx, dword [eax + ebx*4 + 0x10]
add esi, 0x20
mov dword [esp], ecx
test ecx, ecx
je 0x10022e75
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], edx
mov ecx, dword [esp + 4]
mov ebx, dword [ecx + 0x40]
test ebx, ebx
jne 0x10022f4f
mov edx, dword [esp]
bsf edi, edx
mov ebx, dword [esp + 0x10]
or esi, edi
btc edx, edi
mov dword [esp], edx
mov edx, dword [esp + 0x1c]
imul esi, dword [edx + 8]
mov edx, dword [edx + 0x18]
mov dword [esp + 4], edx
mov edi, dword [esp + 0x18]
mov edx, dword [esp]
mov dword [eax + edi*4 + 0x10], edx
mov edx, dword [esp + 4]
add edx, eax
add esi, edx
mov edx, dword [esp + 0xc]
mov dword [eax + 4], edx
jmp 0x10022cab
mov edi, esi
mov esi, ecx
cmp edx, 2
jb 0x10022fdf
mov ecx, 0x20
mov eax, 0x20
dec edx
je 0x10022f07
bsr eax, edx
xor eax, 0x1f
sub ecx, eax
mov edx, edi
shl edx, cl
cmp edx, 8
mov eax, 8
cmovbe edx, eax
mov eax, edx
shr eax, 3
or eax, 1
bsr eax, eax
jmp 0x10022e3b
cmp edx, 0xfe000
ja 0x1002300c
push 0
call fcn.1001d2a0
add esp, 4
mov esi, eax
jmp 0x10022cca
mov ecx, 0x20
jmp 0x10022e27
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 8], edx
shld edx, eax, 0x17
mov edi, eax
shl edi, 0x17
xor edi, eax
mov ecx, dword [ebx + 0xc]
xor edx, dword [esp + 8]
mov dword [esp + 0x28], edx
mov eax, dword [ebx + 8]
mov dword [esp + 8], eax
mov dword [ebx + 4], ecx
shld edx, edi, 0xf
mov dword [esp + 0x24], edx
mov edx, dword [esp + 8]
xor edi, edx
mov eax, ecx
shr eax, 0x1a
xor eax, ecx
shld ecx, edx, 6
xor ecx, edi
xor ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
xor eax, edx
shr edx, 0x11
xor eax, edx
mov edx, dword [esp + 8]
mov dword [ebx], edx
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], ecx
add ecx, edx
mov edx, dword [esp]
mov edi, edx
ror edi, cl
test edi, edi
je 0x10022fd8
bsf edi, edi
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add edi, ecx
and edi, 0x1f
mov ecx, dword [esp + 4]
jmp 0x10022eb1
mov edi, 0x20
jmp 0x10022fc2
xor ecx, ecx
jmp 0x10022f09
mov edi, esi
mov esi, dword [0x1007d75c]
mov eax, dword [0x1007d328]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov ecx, esi
mov esi, edi
mov dword [eax + 8], ecx
jmp 0x10022c1a
push 0
push 0x100000
call fcn.10002410
add esp, 8
jmp 0x10022f3e
push 0x1007d76c
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x1007d740]
test eax, eax
jne 0x100231f2
mov eax, dword [0x1007d774]
mov ecx, dword [0x1007d328]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jle 0x1002308b
push 0x1007d774
call fcn.1002f5e1
add esp, 4
cmp dword [0x1007d774], 0xffffffff
jne 0x1002308b
lea esi, [esp + 0x40]
push esi
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [esi + 4]
mov dword [0x1007d770], eax
push 0x1007d774
call fcn.1002f5e1
add esp, 4
mov eax, 0x1000
xor edx, edx
div dword [0x1007d770]
test edx, edx
jne 0x10023229
mov edi, 0x1007d778
push 0x40
push edi
push str.MALLOC_OPTIONS
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
cmove edi, eax
je 0x100230fa
mov al, byte [edi]
test al, al
je 0x100230fa
xor ebx, ebx
movsx ecx, al
add ecx, 0xffffffd0
cmp ecx, 9
jbe 0x10023290
xor esi, esi
inc esi
jmp 0x100230d9
mov al, byte [edi + ebx]
dec esi
movsx ecx, al
cmp ecx, 0x72
jne 0x1002324d
mov byte [0x1007d6ac], 1
test esi, esi
jne 0x100230d6
mov al, byte [edi + ebx + 1]
inc ebx
test al, al
jne 0x100230c2
mov dword [0x1007d720], 0
mov esi, 0x1388
mov edi, dword [sym.imp.kernel32.dll_InitializeCriticalSectionAndSpinCount]
push esi
push 0x1007d724
call edi
xor ebx, ebx
mov dword [0x1007d7b8], ebx
mov dword [0x1007d73c], ebx
push esi
push 0x1007d6b0
call edi
mov dword [0x1007d6c8], ebx
mov dword [0x1007d6cc], ebx
mov dword [0x1007d6d0], ebx
mov dword [0x1007d71c], ebx
mov dword [0x1007d714], ebx
push esi
push 0x1007d6f0
call edi
mov dword [0x1007d764], ebx
mov dword [0x1007d768], ebx
mov dword [esp + 0x44], ebx
mov eax, dword [0x1007d024]
mov dword [esp + 0x40], eax
push esi
push 0x1007d744
call edi
test eax, eax
je 0x1002326d
lea edx, [esp + 0x40]
xor ecx, ecx
call fcn.10025e30
mov dword [0x1007d75c], eax
test eax, eax
je 0x10023283
mov ecx, dword [0x1007d328]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 8], eax
push 0x1388
push 0x1007d6d4
call dword [sym.imp.kernel32.dll_InitializeCriticalSectionAndSpinCount]
mov ecx, 0x4000
call fcn.1000bb80
test eax, eax
je 0x10023279
mov esi, eax
push 0x4000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x1007d6ec], esi
xor eax, eax
inc eax
xchg dword [0x1007d740], eax
call fcn.100023f0
push 0x1007d76c
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
mov edi, dword [ebp + 8]
mov ebx, dword [esp + 0x10]
jmp 0x10022be6
dec dword [eax + 8]
push dword [esp + 0x20]
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 0x10022ce2
mov ecx, str._jemalloc_
mov edx, str.Compile_time_page_size_does_not_divide_the_runtime_one._n
call fcn.10034840
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_CRASH__
int3
cmp ecx, 0x46
jne 0x100232b5
mov eax, dword [0x1007d024]
test eax, eax
je 0x100232d6
add eax, eax
je 0x100230ed
mov dword [0x1007d024], eax
jmp 0x100230ed
mov dword [0x1007d75c], 0
jmp 0x10023283
mov dword [0x1007d6ec], 0
push 0x1007d76c
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x10023216
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 0x10023292
test esi, esi
je 0x100230f1
jmp 0x100230d9
cmp ecx, 0x52
jne 0x100232c6
mov byte [0x1007d6ac], 0
jmp 0x100230ed
cmp ecx, 0x66
jne 0x100232e5
shr dword [0x1007d024], 1
jmp 0x100230ed
mov dword [0x1007d024], 1
jmp 0x100230ed
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, 0x1007441b
call fcn.10034840
jmp 0x100230ed