Function at 0x401bc0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
push eax
xor esi, esi
mov dword [ebp - 0x30], edi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x24]
mov dword [ebp - 0x28], 0
push eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], esi
mov word [ebp - 0x20], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401c20
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x2c]
push esi
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x401c28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x401c36
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test esi, esi
jne 0x401eec
cmp dword [ebp - 0x28], esi
je 0x401eec
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebx - 3]
cmp eax, 1
ja 0x401ec9
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
push 0x403acc
push dword [edi + 4]
call esi
add esp, 8
test eax, eax
jne 0x401c7f
cmp ebx, 4
je 0x401c78
cmp ebx, 3
jne 0x401c7f
mov esi, 1
jmp 0x401ca0
push str.reset
push dword [edi + 4]
call esi
add esp, 8
test eax, eax
jne 0x401ec9
cmp ebx, 3
jne 0x401ec9
lea esi, [eax + 2]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
push str.companynetwork
push dword [edi + 8]
call ebx
add esp, 8
test eax, eax
jne 0x401cc3
mov ebx, str.companynetwork
mov edi, str.Authrequired
jmp 0x401ce2
push str.systemnetwork
push dword [edi + 8]
call ebx
add esp, 8
test eax, eax
jne 0x401ec9
mov ebx, str.systemnetwork
mov edi, str.Authrequired2
mov dword [ebp - 0x28], edi
sub esi, 0
je 0x401ec9
sub esi, 1
je 0x401d39
sub esi, 1
jne 0x401eb6
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push str.C:programdata_siemensMotionControluser_systemetc_sinumerikvnc.ini
push 0x403af6
push ebx
push str.Passwords
call esi
push str.C:programdata_siemensMotionControluser_systemetc_sinumerikvnc.ini
push 0x403af8
push edi
push str.Passwords
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401f0b
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 3
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
mov byte [ebp - 0x14], 0
movq qword [ebp - 0x10], xmm0
mov byte [ebp - 8], 0
jne 0x401d9e
push str.VNC_password:
push 0x403a18
xor edi, edi
call fcn.00401b90
add esp, 8
lea esi, [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
cmp al, 0xd
je 0x401d8c
cmp al, 0xa
je 0x401d8c
cmp edi, 8
jge 0x401d8c
mov byte [esi], al
inc edi
inc esi
call dword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
cmp al, 0xd
jne 0x401d75
push 0x403a1c
mov byte [esi], 0
call fcn.00401b90
add esp, 4
jmp 0x401dd5
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x1c]
push 8
push dword [esi + 0xc]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov edx, dword [esi + 0xc]
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401dc0
sub ecx, esi
push ecx
push 0x2a
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, dword [ebp - 0x28]
xor edx, edx
nop word [eax + eax]
lea eax, [ebp - 0x1c]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401de6
sub eax, edi
cmp edx, eax
jae 0x401df9
mov al, byte [ebp + edx - 0x1c]
jmp 0x401dfb
xor al, al
mov byte [ebp + edx - 0x10], al
inc edx
cmp edx, 8
jb 0x401de0
call section..text
movzx ecx, byte [ebp - 0x10]
movzx eax, byte [ebp - 0xf]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0xb]
mov dword [ebp - 0x24], ecx
movzx ecx, byte [ebp - 0xc]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 9]
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x24]
call fcn.00401240
movzx eax, byte [ebp - 0x21]
mov byte [ebp - 0x10], al
movzx eax, byte [ebp - 0x22]
mov byte [ebp - 0xf], al
movzx eax, byte [ebp - 0x23]
mov byte [ebp - 0xe], al
movzx eax, byte [ebp - 0x24]
mov byte [ebp - 0xd], al
movzx eax, byte [ebp - 0x1d]
mov byte [ebp - 0xc], al
movzx eax, byte [ebp - 0x1e]
push str.C:programdata_siemensMotionControluser_systemetc_sinumerikvnc.ini
mov byte [ebp - 0xb], al
mov eax, dword [ebp - 0x20]
push 8
mov byte [ebp - 0xa], ah
mov byte [ebp - 9], al
lea eax, [ebp - 0x10]
push eax
push ebx
push str.Passwords
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStructA]
push str.C:programdata_siemensMotionControluser_systemetc_sinumerikvnc.ini
push 0x403af4
push esi
push str.Passwords
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401f0b
mov esp, ebp
pop ebp
ret
push str._nUsage:_n__sc_vncpwd_setreset_companynetworksystemnetwork__password_
call fcn.00401b90
add esp, 4
mov eax, 1
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401f0b
mov esp, ebp
pop ebp
ret
push str._nAdministrator_Rights_required___n
call fcn.00401b90
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
call fcn.00401f0b
mov esp, ebp
pop ebp
ret