Function at 0x401570
Capabilities:
Get os information via kuser_shared_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
cmp dword [ebp + 8], 0
je 0x40177e
cmp dword [0x40a0b0], 0
je 0x40159b
push str.PatchKernel32ImageVersionCheck
push str.Internal_error:__s_bPatchTRUE__called_inappropriately
call fcn.00404d20
cmp dword [0x40a0bc], 0
jne 0x4015f3
push 4
push 0x3000
push 4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x40a0bc], eax
cmp dword [0x40a0bc], 0
jne 0x4015d3
call fcn.00404c60
push eax
push str.Failed_to_allocate_memory:__s
call fcn.00404d20
mov eax, dword [0x40a0bc]
mov dword [eax], 0xffffffff
lea eax, [ebp - 4]
push eax
push 2
push 4
mov ecx, dword [0x40a0bc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [0x40a0c0], 0
jne 0x40164b
push 4
push 0x3000
push 4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x40a0c0], eax
cmp dword [0x40a0c0], 0
jne 0x40162b
call fcn.00404c60
push eax
push str.Failed_to_allocate_memory:__s
call fcn.00404d20
mov eax, dword [0x40a0c0]
mov dword [eax], 0xffffffff
lea eax, [ebp - 4]
push eax
push 2
push 4
mov ecx, dword [0x40a0c0]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [0x40a0bc], 0xfffffffc
ja 0x40165d
cmp dword [0x40a0c0], 0xfffffffc
jbe 0x401667
push str.Internal_error:_Pointer_to_faked_subsystem_version_too_large.
call fcn.00404d20
push 0xc
lea eax, [ebp - 0x10]
push eax
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0xffffffffffffffff
call sub.PSAPI.DLL_GetModuleInformation
test eax, eax
jne 0x401694
call fcn.00404c60
push eax
push str.Failed_to_retrieve_module_information_of_KERNEL32.DLL:__s
call fcn.00404d20
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
jmp 0x4016ae
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
sub eax, 4
cmp dword [ebp - 0x14], eax
jae 0x40176f
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
cmp dword [0x40a0b4], 0
je 0x4016da
cmp dword [0x40a0b8], 0
je 0x4016da
jmp 0x40176f
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0x7ffe026c
jne 0x401723
mov eax, dword [ebp - 0x1c]
mov dword [0x40a0b4], eax
lea eax, [ebp - 0x20]
push eax
push 0x80
push 4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x40a0bc]
mov dword [eax], ecx
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x40176a
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0x7ffe0270
jne 0x40176a
mov eax, dword [ebp - 0x1c]
mov dword [0x40a0b8], eax
lea eax, [ebp - 0x24]
push eax
push 0x80
push 4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x40a0c0]
mov dword [eax], ecx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
push 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x4016a5
mov dword [0x40a0b0], 1
jmp 0x401857
cmp dword [0x40a0b0], 0
je 0x401857
lea eax, [ebp - 4]
push eax
push 0x80
push 4
mov ecx, dword [0x40a0b4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x40a0b4]
mov dword [eax], 0x7ffe026c
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 4
mov edx, dword [0x40a0b4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
push eax
push 0x80
push 4
mov ecx, dword [0x40a0b8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x40a0b8]
mov dword [eax], 0x7ffe0270
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 4
mov edx, dword [0x40a0b8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [0x40a0b4], 0
mov dword [0x40a0b8], 0
push 0x8000
push 0
mov eax, dword [0x40a0bc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x40a0bc], 0
push 0x8000
push 0
mov eax, dword [0x40a0c0]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x40a0c0], 0
mov dword [0x40a0b0], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret