Function at 0x4201c8
Capabilities:
Get session user name

Disassembly:
mov eax, 0x42857b
call fcn.00427220
sub esp, 0x534
push esi
push 4
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x14], eax
xor esi, esi
cmp eax, esi
mov dword [ebp - 4], esi
je 0x4201f9
mov ecx, eax
call fcn.004169a0
mov dword [ebp - 0x10], eax
jmp 0x4201fc
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp - 0x10]
or dword [ebp - 4], 0xffffffff
call fcn.004169b4
test eax, eax
jne 0x420236
cmp dword [0x43b8b4], esi
jne 0x420236
cmp dword [0x43b8b8], esi
jne 0x42022f
push esi
push dword [0x437eac]
push 0x439528
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x420506
push ebx
push edi
lea ecx, [ebp - 0x540]
call fcn.0041acd3
push dword [0x437eac]
lea ecx, [ebp - 0x540]
mov dword [ebp - 4], 1
call fcn.0041c1dc
push str.C:cppSCZ_SCwinvncwinvncwinvnc.cpp_:_server_created_ok_n
push esi
push 0x4386e8
call fcn.00405446
mov edi, 0x43c574
xor ebx, ebx
push edi
call sub.MSVCRT.dll_strlen
add esp, 0x10
test eax, eax
jbe 0x4202a4
movsx eax, byte [ebx + 0x43c574]
lea esi, [ebx + 0x43c574]
push eax
call dword [sym.imp.MSVCRT.dll_tolower]
push edi
mov byte [esi], al
inc ebx
call sub.MSVCRT.dll_strlen
pop ecx
cmp ebx, eax
pop ecx
jb 0x42027f
xor esi, esi
push edi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x42041f
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
cmp byte [esi + 0x43c574], 0x20
lea ebx, [esi + 0x43c574]
jle 0x42040b
push str._password
call sub.MSVCRT.dll_strlen
push eax
push str._password
push ebx
call edi
add esp, 0x10
test eax, eax
jne 0x420326
push str._password
call sub.MSVCRT.dll_strlen
pop ecx
add eax, esi
mov cl, byte [eax + 0x43c574]
cmp cl, 0x20
jg 0x420305
test cl, cl
je 0x420305
inc eax
jmp 0x4202f3
cmp byte [eax + 0x43c574], 0x20
mov esi, eax
jle 0x42031a
inc esi
cmp byte [esi + 0x43c574], 0x20
jg 0x420310
and byte [esi + 0x43c574], 0
jmp 0x42040b
push str._noregistry
call sub.MSVCRT.dll_strlen
push eax
push str._noregistry
push ebx
call edi
add esp, 0x10
test eax, eax
jne 0x42034d
push str._noregistry
call sub.MSVCRT.dll_strlen
pop ecx
add esi, eax
mov ebx, str._notrayicon
push ebx
call sub.MSVCRT.dll_strlen
push eax
lea eax, [esi + 0x43c574]
push ebx
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x420384
push str._noregistry
call sub.MSVCRT.dll_strlen
pop ecx
add esi, eax
push 1
lea ecx, [ebp - 0x540]
call fcn.0041d00a
mov ebx, str._readonly
push ebx
call sub.MSVCRT.dll_strlen
push eax
lea eax, [esi + 0x43c574]
push ebx
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x4203b7
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
add esi, eax
push 0
lea ecx, [ebp - 0x540]
call fcn.0041c28b
mov ebx, str._username
push ebx
call sub.MSVCRT.dll_strlen
push eax
lea eax, [esi + 0x43c574]
push ebx
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x42040b
push ebx
call sub.MSVCRT.dll_strlen
add esi, eax
pop ecx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x101
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x42040b
lea eax, [ebp - 0x138]
lea ecx, [ebp - 0x540]
push eax
call fcn.0041c1dc
push 0x43c574
inc esi
call sub.MSVCRT.dll_strlen
cmp esi, eax
pop ecx
jb 0x4202b9
push 0x63c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x18], eax
xor edi, edi
mov byte [ebp - 4], 2
cmp eax, edi
je 0x420449
lea ecx, [ebp - 0x540]
push ecx
mov ecx, eax
call fcn.00418de2
mov ebx, eax
jmp 0x42044b
xor ebx, ebx
cmp ebx, edi
mov byte [ebp - 4], 1
jne 0x42046d
push str.C:cppSCZ_SCwinvncwinvncwinvnc.cpp_:_failed_to_create_tray_menu_n
push edi
push 0x4386e8
call fcn.00405446
add esp, 0xc
push edi
call dword [sym.imp.USER32.dll_PostQuitMessage]
cmp dword [ebp + 8], edi
jbe 0x420485
cmp word [ebp + 0xc], di
jbe 0x420485
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041da37
pop ecx
pop ecx
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push edi
push edi
lea eax, [ebp - 0x34]
push edi
push eax
call esi
test eax, eax
je 0x4204b5
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push edi
push edi
lea eax, [ebp - 0x34]
push edi
push eax
jmp 0x420492
push str.C:cppSCZ_SCwinvncwinvncwinvnc.cpp_:_shutting_down_server_n
push edi
push 0x4386e8
call fcn.00405446
add esp, 0xc
cmp ebx, edi
je 0x4204da
mov ecx, ebx
call fcn.004190fb
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x10], edi
pop edi
pop ebx
je 0x4204f2
mov ecx, dword [ebp - 0x10]
call fcn.004169a6
push dword [ebp - 0x10]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov esi, dword [ebp - 0x2c]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x540]
call fcn.0041af2f
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret