Function at 0x10166de
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x1021480]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x5c], ecx
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x60]
push ecx
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x58]
push ecx
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x3c], ebx
call fcn.01016ec0
mov esi, eax
cmp esi, ebx
jl 0x10168db
push ebx
push 0x18
lea eax, [ebp - 0xa4]
push eax
push 7
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
cmp esi, ebx
jl 0x10168db
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0x6a
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x101676c
mov eax, 0xc0000017
jmp 0x1016913
push edi
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0xa4], ebx
jbe 0x10168bf
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x38]
call fcn.0101a5f2
test eax, eax
jl 0x10168a4
mov eax, dword [ebp - 0x60]
cmp dword [ebp - 0x3c], ebx
jne 0x10167c9
push 5
pop ecx
lea edi, [ebp - 0x28]
lea esi, [eax + 4]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x10167c9
push dword [ebp - 0x40]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x10168a4
mov edi, dword [eax + 4]
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x6c], edi
cmp eax, ebx
je 0x1016923
cmp edi, 1
jne 0x1016928
push dword [eax]
push dword [ebp - 0x38]
push 0x101ebec
push 0x35
push dword [ebp - 0x34]
call sub.msvcrt.dll_swprintf_s
add esp, 0x14
push dword [ebp - 0x34]
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push ebx
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x7c], eax
push 3
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0x84]
push eax
push 0x80000000
lea eax, [ebp - 0x68]
push eax
mov dword [ebp - 0x84], 0x18
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x78], 0x40
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
call dword [sym.imp.ntdll.dll_NtOpenFile]
test eax, eax
jl 0x101685e
push dword [ebp - 0x68]
call dword [sym.imp.ntdll.dll_NtClose]
mov byte [ebp - 0x2d], 1
push dword [ebp - 0x40]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp dword [ebp - 0x3c], ebx
je 0x10168b6
cmp byte [ebp - 0x2d], 1
jne 0x10168a4
push dword [ebp - 0x34]
call fcn.01015d84
mov dword [ebp - 0x48], eax
cmp eax, ebx
je 0x10168a1
push eax
push dword [ebp - 0x3c]
call sub.msvcrt.dll__wcsicmp
pop ecx
pop ecx
test eax, eax
je 0x10169c4
mov byte [ebp - 0x2d], bl
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0xa4]
jb 0x101677f
cmp byte [ebp - 0x2d], bl
jne 0x10169c4
push dword [ebp - 0x34]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
mov esi, 0xc000000d
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
cmp dword [ebp - 0x3c], ebx
je 0x10168f6
push dword [ebp - 0x3c]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp dword [ebp - 0x48], ebx
je 0x1016911
push dword [ebp - 0x48]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0100b7c7
leave
ret 8
cmp edi, 1
je 0x1016930
cmp edi, ebx
jne 0x101685e
mov dword [ebp - 0x50], ebx
cmp edi, ebx
jne 0x1016941
cmp eax, ebx
jne 0x101693e
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], ebx
cmp dword [eax + 4], ebx
jbe 0x101685e
mov dword [ebp - 0x4c], ebx
mov ecx, dword [ebp - 0x4c]
lea esi, [ecx + eax + 0x30]
mov eax, dword [esi + 0x18]
cmp eax, ebx
je 0x10169aa
push eax
push dword [ebp - 0x38]
push 0x101ebec
push 0x35
push dword [ebp - 0x34]
call sub.msvcrt.dll_swprintf_s
add esp, 0x14
cmp edi, 1
jne 0x1016994
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
cmp ecx, dword [esi + 8]
jne 0x10169aa
mov eax, dword [eax + 4]
cmp eax, dword [esi + 0xc]
je 0x101685a
jmp 0x10169aa
push 4
lea edi, [esi + 0x30]
mov esi, dword [ebp - 0x50]
pop ecx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x101685a
mov edi, dword [ebp - 0x6c]
inc dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
add dword [ebp - 0x4c], 0x90
cmp ecx, dword [eax + 4]
jb 0x1016953
jmp 0x101685e
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x34]
call fcn.0101a12e
test eax, eax
jl 0x10169f0
push dword [ebp - 0x34]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x5c]
mov dword [ecx], eax
xor esi, esi
jmp 0x10168da