Function at 0x51d380
Capabilities:
Get number of processors
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 0xc]
lea edx, [esp - 0x18]
sub esp, 0x2c
push ebx
push esi
push edi
sub esp, 8
call fcn.0051af40
test eax, eax
jns 0x51d3ab
lfence
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
push 0x64
push 1
push 7
push 0x80
push 0
push 0x110081
push dword [ebp + 8]
lea eax, [esp + 0x34]
push eax
call sym.SystemInformer.exe_Ordinal_1469
mov esi, eax
lfence
test esi, esi
jns 0x51d3fd
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x51d3f2
mov eax, dword fs:[0x18]
push ecx
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
movzx esi, word [esp + 0x20]
add esi, 0x12
push esi
push 4
push dword [0x633a74]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push esi
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x28], ebx
call fcn.005861b0
add esp, 0xc
mov dword [ebx + 4], 0
cmp byte [ebp + 0x10], 0
sete cl
mov byte [ebx], cl
movzx eax, word [esp + 0x20]
mov dword [ebx + 8], eax
movzx eax, word [esp + 0x20]
push eax
push dword [esp + 0x28]
lea eax, [ebx + 0xc]
push eax
call fcn.00586310
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x51d47c
push eax
mov eax, dword fs:[0x18]
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
push 0xa
push esi
push ebx
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x34]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
mov edi, eax
cmp edi, 0xc00000d4
jne 0x51d5ed
lea eax, [esp + 0x30]
push eax
push ebx
call sym.SystemInformer.exe_Ordinal_1511
mov edi, eax
test edi, edi
js 0x51d5ed
cmp byte [ebp + 0x10], 0
mov ecx, 2
push 0
push 0x64
mov eax, 5
cmovne eax, ecx
push eax
push 1
push 0x80
lea eax, [esp + 0x44]
push eax
push 0x120116
push dword [ebp + 0xc]
lea eax, [esp + 0x30]
push eax
lfence
call sym.SystemInformer.exe_Ordinal_1469
mov edi, eax
test edi, edi
js 0x51d5ed
push 4
push 0x1000
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2000
push eax
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
nop
test eax, eax
js 0x51d5e8
mov edi, dword [esp + 0x14]
test edi, edi
je 0x51d5e8
push 0
push 0
push 0x2000
push edi
lea eax, [esp + 0x38]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, dword [esp + 0x10]
mov esi, eax
mov dword [esp + 0x10], ecx
test esi, esi
js 0x51d5bc
lfence
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x51d5bc
push 0
push 0
push eax
push edi
lea eax, [esp + 0x38]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x51d5bc
cmp dword [esp + 0x2c], 0
je 0x51d5bc
push 0
push 0
push 0x2000
push edi
lea eax, [esp + 0x38]
push eax
push 0
push 0
push 0
push ebx
lfence
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, dword [esp + 0x10]
mov esi, eax
test esi, esi
jns 0x51d561
push edi
call sym.SystemInformer.exe_Ordinal_1382
xor edi, edi
cmp esi, 0xc0000011
cmovne edi, esi
mov esi, dword [esp + 0x10]
test edi, edi
je 0x51d5df
mov ecx, esi
call fcn.00517520
push esi
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x51d5ed
mov edi, 0xc0000017
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
push dword [esp + 0x1c]
push 0
push dword [0x633a74]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc