Function at 0x401f70
Capabilities:
Check os version
Get session user name
Get user security identifier

Disassembly:
mov eax, 0x12a4
call fcn.00403f40
mov eax, dword [esp + 0x12a8]
push ebx
push esi
mov esi, ecx
mov ecx, dword [esp + 0x12b4]
xor ebx, ebx
cmp ecx, ebx
push edi
mov dword [esi + 4], eax
je 0x401f98
mov eax, ecx
mov dword [esi + 8], eax
lea eax, [esp + 0x1c]
mov edi, 1
push eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], 0xf01ff
mov dword [esi + 0x4c], 0x10
mov dword [esi + 0x50], 2
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi], 0x4091f8
mov dword [esp + 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edx, dword [esp + 0x2c]
cmp edx, 2
jne 0x40206f
mov eax, dword [esp + 0x20]
cmp eax, 3
jne 0x402013
mov dword [esi + 0x6c], 0x10000001
jmp 0x4020bd
cmp eax, 4
jne 0x402024
mov dword [esi + 0x6c], 0x10000002
jmp 0x4020bd
cmp eax, 5
jne 0x402061
mov eax, dword [esp + 0x24]
cmp eax, ebx
jne 0x40203d
mov dword [esi + 0x6c], 0x10000004
jmp 0x4020bd
cmp eax, edi
jne 0x40204a
mov dword [esi + 0x6c], 0x10000008
jmp 0x4020bd
cmp eax, 2
jne 0x402058
mov dword [esi + 0x6c], 0x10000010
jmp 0x4020bd
mov dword [esi + 0x6c], 0x11000000
jmp 0x4020bd
cmp eax, 6
jne 0x402058
mov dword [esi + 0x6c], 0x10000020
jmp 0x4020bd
cmp edx, edi
jne 0x4020a9
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
cmp eax, 4
ja 0x402092
cmp eax, 4
jne 0x402089
cmp ecx, ebx
ja 0x402092
mov dword [esi + 0x6c], 0x20000001
jmp 0x4020bd
cmp ecx, 0x5a
jne 0x4020a0
mov dword [esi + 0x6c], 0x20000004
jmp 0x4020bd
mov dword [esi + 0x6c], 0x20000002
jmp 0x4020bd
cmp edx, ebx
jne 0x4020b6
mov dword [esi + 0x6c], 0x40000000
jmp 0x4020bd
mov dword [esi + 0x6c], 0x80000000
xor ecx, ecx
cmp edx, 2
sete cl
mov dword [esi + 0x40], ecx
mov dword [0x40bd7c], edi
mov dword [0x40bd80], esi
mov eax, dword [esi + 0x40]
cmp eax, ebx
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x28], ebx
je 0x4021ad
mov eax, 0xff
mov ecx, 0x40
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
xor eax, eax
lea edi, [esp + 0xb0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x1b0]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x2b0]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x10]
lea eax, [esp + 0xb0]
push edx
push eax
mov dword [esp + 0x1c], 0x1000
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea ecx, [esp + 0x18]
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x1b4]
push edx
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x2bc]
push ecx
lea eax, [esp + 0xc0]
push edx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x4021ad
lea ecx, [esp + 0x2b0]
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x4021ad
lea edx, [esp + 0x2b0]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
push edi
call fcn.00403f30
add esp, 4
lea ecx, [esp + 0x2b0]
mov dword [esi + 0x3c], eax
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x12a4
ret 8