Function at 0x1002a470
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 0x1002aaec
push 0x1007a70c
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x1007a730]
test esi, esi
je 0x1002aad7
mov eax, dword [ebp + 8]
mov ecx, 0xffffffff
xor edx, edx
cmp dword [esi + 8], eax
setb dl
cmova edx, ecx
test edx, edx
je 0x1002a4e8
cmp edx, 0xffffffff
jne 0x1002a4e0
mov esi, dword [esi]
test esi, esi
jne 0x1002a4b5
jmp 0x1002aad7
mov esi, dword [esi + 4]
and esi, 0xfffffffe
jmp 0x1002a4cb
push 0x1007a70c
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [0x1007a708]
test eax, eax
je 0x1002a8dd
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x1002aaf3
test esi, esi
je 0x1002aafd
cmp edx, 0x800
ja 0x1002a814
cmp edx, 8
jbe 0x1002a7c7
cmp edx, 0x201
jae 0x1002a727
add edx, 0xf
mov eax, edx
and eax, 0xfffffff0
mov dword [esp + 0x24], eax
shr edx, 4
shl edx, 5
mov dword [esp + 4], edx
lea ebx, [esi + edx]
add ebx, 0x50
cmp byte [esi + 0x3c], 0
jne 0x1002a5fa
lea eax, [esi + 0xc]
mov dword [esp + 0x14], eax
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebx]
test eax, eax
je 0x1002a70f
cmp dword [eax + 8], 0
je 0x1002a70f
mov edx, dword [eax + 4]
mov edi, dword [eax + edx*4 + 0xc]
test edi, edi
mov dword [esp + 0x18], esi
je 0x1002a754
mov ebx, dword [esi + 0x40]
test ebx, ebx
jne 0x1002a680
bsf esi, edi
mov ebx, edx
shl ebx, 5
or ebx, esi
btc edi, esi
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 4]
imul ebx, dword [esi + ecx + 0x58]
mov ecx, dword [esi + ecx + 0x68]
mov dword [eax + edx*4 + 0xc], edi
add ecx, eax
add ebx, ecx
add dword [eax + 8], 0xffffffff
test ebx, ebx
je 0x1002ab56
mov eax, dword [esp + 0x24]
add dword [esi + 0x2c], eax
push dword [esp + 0x14]
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x1002ab60
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.1002cad0
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esi + 0x40], 0
jne 0x1002a55a
mov edi, esi
mov byte [esi + 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.1000b180
xor edx, edx
cmp byte [esi + 8], 0
mov dword [esp + 0x14], 0
mov esi, 0
je 0x1002a64f
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x30]
cmp byte [esp + 0x48], 0
mov ecx, 0
je 0x1002a663
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], esi
mov ecx, dword [esp + 0x14]
mov dword [eax + 0xc], ecx
mov esi, edi
mov dword [edi + 0x40], eax
mov byte [edi + 0x3c], 1
jmp 0x1002a55a
mov dword [esp + 0x20], edx
mov dword [esp + 0x10], eax
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov dword [esp + 0xc], esi
shld esi, ecx, 0x17
mov eax, ecx
shl eax, 0x17
xor eax, ecx
mov edx, dword [ebx + 0xc]
xor esi, dword [esp + 0xc]
mov dword [esp + 8], esi
mov ecx, dword [ebx + 8]
mov dword [esp + 0xc], ecx
mov dword [ebx + 4], edx
shld esi, eax, 0xf
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0xc]
xor eax, esi
mov ecx, edx
shr ecx, 0x1a
xor ecx, edx
shld edx, esi, 6
xor edx, eax
xor edx, dword [esp + 0x1c]
mov esi, dword [esp + 8]
xor ecx, esi
shr esi, 0x11
xor ecx, esi
mov eax, dword [esp + 0xc]
mov dword [ebx], eax
mov dword [ebx + 0xc], ecx
mov dword [ebx + 8], edx
add edx, eax
mov esi, edi
mov ecx, edx
ror esi, cl
test esi, esi
je 0x1002a708
bsf esi, esi
add esi, edx
and esi, 0x1f
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
jmp 0x1002a59d
mov esi, 0x20
jmp 0x1002a6f6
mov ecx, esi
mov edx, ebx
call fcn.10017000
mov dword [ebx], eax
test eax, eax
jne 0x1002a57c
jmp 0x1002ab56
add edx, 0xffffffff
je 0x1002a80a
bsr ecx, edx
xor ecx, 0x1f
neg cl
mov eax, 1
shl eax, cl
mov dword [esp + 0x24], eax
shr eax, 9
or eax, 1
bsr edx, eax
xor edx, 0x20
jmp 0x1002a543
mov edi, dword [esp + 4]
mov ecx, dword [esi + edi + 0x64]
mov dword [esp + 0x10], ecx
mov ebx, edx
shl ebx, 5
mov ecx, edx
add edx, 1
cmp edx, dword [esp + 0x10]
jae 0x1002ab53
mov dword [esp + 0xc], ecx
mov ecx, dword [eax + ecx*4 + 0x10]
add ebx, 0x20
test ecx, ecx
je 0x1002a765
mov dword [esp + 0x20], edx
mov dword [esp + 0x10], eax
mov edx, dword [esi + 0x40]
test edx, edx
jne 0x1002a833
bsf edx, ecx
or ebx, edx
btc ecx, edx
imul ebx, dword [esi + edi + 0x58]
mov eax, edi
mov edi, ecx
mov ecx, dword [esi + eax + 0x68]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov dword [eax + edx*4 + 0x10], edi
add ecx, eax
add ebx, ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + 4], ecx
jmp 0x1002a5c0
cmp edx, 2
jb 0x1002a8c2
mov ecx, 0x20
mov eax, 0x20
add edx, 0xffffffff
je 0x1002a7e5
bsr eax, edx
xor eax, 0x1f
sub ecx, eax
mov eax, 1
shl eax, cl
cmp eax, 8
ja 0x1002a7f8
mov eax, 8
mov dword [esp + 0x24], eax
shr eax, 3
or eax, 1
bsr edx, eax
jmp 0x1002a543
mov ecx, 0x20
jmp 0x1002a736
mov ecx, esi
cmp edx, 0xfe000
ja 0x1002a8c9
push 0
call fcn.10018a40
add esp, 4
mov ebx, eax
jmp 0x1002a5dd
mov eax, dword [edx]
mov esi, dword [edx + 4]
mov dword [esp + 8], esi
shld esi, eax, 0x17
mov edi, eax
shl edi, 0x17
xor edi, eax
mov dword [esp + 0x1c], ecx
mov ecx, dword [edx + 0xc]
xor esi, dword [esp + 8]
mov dword [esp + 0x2c], esi
mov eax, dword [edx + 8]
mov dword [esp + 8], eax
mov dword [edx + 4], ecx
shld esi, edi, 0xf
mov dword [esp + 0x28], esi
mov esi, dword [esp + 8]
xor edi, esi
mov eax, ecx
shr eax, 0x1a
xor eax, ecx
shld ecx, esi, 6
xor ecx, edi
xor ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
xor eax, esi
shr esi, 0x11
xor eax, esi
mov esi, dword [esp + 8]
mov dword [edx], esi
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
add ecx, esi
mov edx, dword [esp + 0x1c]
mov eax, edx
ror edx, cl
test edx, edx
je 0x1002a8bb
bsf edx, edx
mov edi, dword [esp + 4]
add edx, ecx
and edx, 0x1f
mov esi, dword [esp + 0x18]
mov ecx, eax
jmp 0x1002a799
mov edx, 0x20
jmp 0x1002a8a7
xor ecx, ecx
jmp 0x1002a7e7
push 0
push 0x100000
call fcn.10001700
add esp, 8
jmp 0x1002a82c
mov dword [esp + 0x18], esi
push 0x1007a734
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x1007a708]
test eax, eax
jne 0x1002aac3
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 0x1002a94c
push 0x1007a73c
call fcn.1002d432
add esp, 4
cmp dword [0x1007a73c], 0xffffffff
jne 0x1002a94c
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 0x1002ab9b
mov ebx, 0x1007a740
push 0x40
push ebx
push str.MALLOC_OPTIONS
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
cmove ebx, eax
je 0x1002a9cb
mov al, byte [ebx]
test al, al
je 0x1002a9cb
xor edi, edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
movsx ecx, al
add ecx, 0xffffffd0
cmp ecx, 9
jbe 0x1002abe5
xor ecx, ecx
inc ecx
mov dword [esp + 4], ecx
dec dword [esp + 4]
movsx ecx, al
cmp ecx, 0x72
jne 0x1002ab73
mov byte [0x1007a674], 1
cmp dword [esp + 4], 0
je 0x1002a9c2
mov al, byte [ebx + edi]
jmp 0x1002a99f
mov al, byte [ebx + edi + 1]
inc edi
test al, al
jne 0x1002a989
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 0x1002abbf
lea edx, [esp + 0x40]
xor ecx, ecx
call fcn.10021bf0
mov dword [0x1007a724], eax
test eax, eax
je 0x1002abd5
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 0x1002abcb
mov edi, eax
push 0x4000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x1007a6b4], edi
xor eax, eax
inc eax
xchg dword [0x1007a708], eax
call fcn.100016e0
push 0x1007a734
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
mov esi, dword [esp + 0x18]
jmp 0x1002a500
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_RELEASE_ASSERT_result_
int3
xor esi, esi
jmp 0x1002a4f3
mov edx, 1
jmp 0x1002a50b
mov edi, edx
cmp edx, 0x201
jb 0x1002ab14
mov esi, dword [0x1007a724]
mov edx, edi
jmp 0x1002a513
mov eax, dword [0x1007a2f0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov esi, dword [eax + 8]
test esi, esi
mov edx, edi
jne 0x1002a51f
mov esi, dword [0x1007a724]
mov eax, dword [0x1007a2f0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov dword [eax + 8], esi
jmp 0x1002a51f
dec dword [eax + 8]
push dword [esp + 0x14]
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 ebx, ebx
jmp 0x1002a5e5
cmp ecx, 0x46
jne 0x1002ac1b
mov eax, dword [0x1007a024]
test eax, eax
je 0x1002ac3c
add eax, eax
je 0x1002a9b6
mov dword [0x1007a024], eax
jmp 0x1002a9b6
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 0x1002abd5
mov dword [0x1007a6b4], 0
push 0x1007a734
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x1002ab60
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
mov dword [esp + 4], eax
movsx eax, byte [ebx + edi + 1]
inc edi
mov ecx, eax
add ecx, 0xffffffd0
cmp ecx, 0xa
jb 0x1002abed
cmp dword [esp + 4], 0
je 0x1002a9c2
jmp 0x1002a99f
cmp ecx, 0x52
jne 0x1002ac2c
mov byte [0x1007a674], 0
jmp 0x1002a9b6
cmp ecx, 0x66
jne 0x1002ac4b
shr dword [0x1007a024], 1
jmp 0x1002a9b6
mov dword [0x1007a024], 1
jmp 0x1002a9b6
lea ecx, [esp + 0x40]
mov byte [ecx], al
mov byte [ecx + 1], 0
mov eax, 2
push 0xa
push str._jemalloc_
push eax
call esi
add esp, 0xc
push 0x35
push str.:__malloc__Unsupported_character_in_malloc_options:_
mov eax, 2
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x40]
mov edx, 0x10071020
call fcn.10030280
jmp 0x1002a9b6