Function at 0x502540
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x62d040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [0x6336a8], 0x6004a4
mov dword [0x6336a4], edx
call fcn.00502980
push 0x2c
lea eax, [ebp - 0x38]
push 0
push eax
call fcn.00581cf0
add esp, 0xc
lea eax, [ebp - 0x38]
push 0
push 0x2c
push eax
push 0
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
test eax, eax
jns 0x50259d
mov edx, 0x10000
mov al, 1
or ecx, 0xffffffff
mov esi, edx
lea edi, [edx - 1]
jmp 0x5025ac
mov al, byte [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
cmp dword [0x62dbb0], 0x3e
cbw
mov dword [0x6337dc], ecx
mov word [sym.SystemInformer.exe_PhSystemBasicInformation], ax
mov dword [0x6337e0], edx
mov dword [0x6337e4], esi
mov dword [0x6337e8], edi
jb 0x5025f1
push 0
push 0
push 0
push 0
push 0
push 0x1102
call dword [sym.imp.ntdll.dll_RtlCreateHeap]
mov dword [0x6337d4], eax
jmp 0x5025f6
mov eax, dword [0x6337d4]
test eax, eax
jne 0x502635
push eax
push eax
push 0x100000
push 0x200000
push eax
push 0x1002
call dword [sym.imp.ntdll.dll_RtlCreateHeap]
mov dword [0x6337d4], eax
test eax, eax
je 0x5028f7
push 4
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], 2
push ecx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlSetHeapInformation]
push 0
push 0
push 0xf0003
push 0x6355c4
call dword [sym.imp.ntdll.dll_NtCreateKeyedEvent]
test eax, eax
js 0x5028f7
mov ax, 1
cmp ax, word [sym.SystemInformer.exe_PhSystemBasicInformation]
sbb eax, eax
and eax, 0xfa0
mov dword [0x62f278], eax
mov eax, 0x636038
test al, 7
jne 0x5028ec
mov eax, 0x636020
mov dword [0x636038], 0
mov dword [0x63603c], 0
test al, 7
jne 0x5028ec
xor eax, eax
mov dword [0x63602c], 0x200
mov dword [0x636020], eax
mov dword [0x636024], eax
mov dword [0x636028], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x38]
push eax
push 0x28
mov dword [0x636030], 0x38
mov dword [0x63368c], eax
mov dword [0x635c20], eax
call sym.SystemInformer.exe_PhCreateObject
mov edx, eax
mov esi, 1
xor eax, eax
mov ecx, esi
mov word [edx], ax
lock xadd dword [0x633688], ecx
inc ecx
dec cl
mov dword [edx + 8], eax
movzx eax, cl
push edx
mov byte [edx + 2], cl
mov dword [edx + 0xc], str.Type
mov dword [eax*4 + 0x635c20], edx
movzx eax, cl
push 0x28
mov dword [0x63368c], edx
mov word [edx - 8], ax
mov dword [edx + 4], esi
call sym.SystemInformer.exe_PhCreateObject
mov edx, eax
mov ecx, esi
xor eax, eax
mov word [edx], ax
lock xadd dword [0x633688], ecx
inc ecx
dec cl
mov dword [edx + 4], eax
mov dword [edx + 8], eax
movzx eax, cl
mov byte [edx + 2], cl
mov dword [edx + 0xc], str.Alloc
mov dword [0x633684], edx
mov dword [eax*4 + 0x635c20], edx
call fcn.005023e0
mov dword [0x6352bc], eax
cmp eax, 0xffffffff
je 0x5028f7
lea ecx, [ecx]
call fcn.004fc520
test al, al
je 0x5028f7
cmp byte [0x7ffe03c4], 1
jne 0x5027a9
mov eax, dword ds:[0x7ffe03c0]
dec eax
cmp eax, 0x1f
jbe 0x5028ae
lea eax, ds:[ebp - 0x40]
mov dword [ebp - 0x44], 0
push eax
lea edx, [ebp - 0x3c]
mov ecx, 4
call fcn.0051e000
test eax, eax
js 0x5028ae
mov ebx, dword ds:[ebp - 0x3c]
xor ecx, ecx
mov dword [ebp - 0x40], ebx
movzx eax, word [ebx + 0xa]
mov dword [ebp - 0x3c], eax
movzx edi, ax
cmp cx, ax
jae 0x5028db
mov si, word [ebp - 0x44]
lea ecx, [ebx + 0x21]
mov edx, edi
movzx eax, byte ds:[ecx]
lea ecx, [ecx + 0x2c]
add si, ax
sub edx, 1
jne 0x5027f2
cmp word [ebp - 0x3c], 1
jbe 0x50289a
lea eax, ds:[edi + edi]
push eax
push 4
lfence
push dword [0x6337d4]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edx, dword [ebp - 0x40]
mov ebx, eax
xor ecx, ecx
mov dword [0x6336b4], ebx
add edx, 0x21
movzx eax, si
lea edx, [edx + 0x2c]
mov dword [ebp - 0x44], eax
lea ecx, [ecx + 2]
movzx eax, byte [edx - 0x2c]
mov word [ecx + ebx - 2], ax
sub edi, 1
je 0x502858
mov ebx, dword [0x6336b4]
jmp 0x502836
push dword [ebp - 0x40]
push 0
push dword [0x6337d4]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 0x44]
test ax, ax
je 0x5028a9
mov word [0x6336ae], ax
mov eax, dword [ebp - 0x3c]
mov word [0x6336b0], ax
xor eax, eax
mov byte [0x6336ac], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret
push ebx
push 0
push dword [0x6337d4]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov esi, 1
mov ax, word [sym.SystemInformer.exe_PhSystemBasicInformation]
mov word [0x6336ae], ax
xor eax, eax
mov word [0x6336b0], si
mov byte [0x6336ac], 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret
push ebx
push 0
push dword [0x6337d4]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x5028ae
push 0x80000002
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
mov ecx, dword [ebp - 4]
mov eax, 0xc0000001
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret