Function at 0x40fdf0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x32c
mov eax, dword [0x42c2e4]
xor eax, esp
mov dword [esp + 0x328], eax
call fcn.0040ef00
test eax, eax
jne 0x40fe27
mov eax, 1
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.004121f9
add esp, 0x32c
ret
push ebx
push ebp
push str.NETAPI32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
xor ebx, ebx
cmp ebp, ebx
mov dword [esp + 0xc], ebp
jne 0x40fe59
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.004121f9
add esp, 0x32c
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.NetWkstaUserGetInfo
push ebp
call esi
push str.NetUserGetInfo
push ebp
mov edi, eax
call esi
mov ebp, eax
mov eax, dword [esp + 0x14]
push str.NetApiBufferFree
push eax
call esi
mov ecx, dword [esp + 0x14]
push str.NetUserGetLocalGroups
push ecx
mov dword [esp + 0x24], eax
call esi
cmp edi, ebx
mov dword [esp + 0x24], eax
je 0x41005c
cmp ebp, ebx
je 0x41005c
cmp dword [esp + 0x1c], ebx
je 0x41005c
cmp eax, ebx
je 0x41005c
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x23c]
push eax
mov byte [esp + 0x1b], bl
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 0xff
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x40ff10
lea ecx, [esp + 0x28]
push ecx
push 1
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x244]
push eax
call fcn.0040eed0
add esp, 8
push eax
push ebx
call ebp
test eax, eax
jne 0x40ff10
mov ecx, dword [esp + 0x28]
cmp dword [ecx + 0xc], 2
je 0x410045
lea edx, [esp + 0x20]
push edx
push 1
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
call edi
test eax, eax
jne 0x410013
mov esi, dword [esp + 0x20]
mov ecx, dword [esi + 4]
lea edx, [esp + 0x38]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x40ff35
lea edi, [esp + 0x38]
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40ff50
mov eax, dword [0x426c04]
mov dword [edi], eax
mov eax, dword [esi]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ff67
lea edi, [esp + 0x38]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40ff80
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40ff80
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x34]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x24]
push eax
push 1
push ebx
lea ecx, [esp + 0x50]
push ecx
push ebx
call dword [esp + 0x44]
test eax, eax
jne 0x410004
mov esi, dword [esp + 0x18]
xor edi, edi
cmp dword [esp + 0x30], ebx
jbe 0x40fffb
lea ebx, [ebx]
cmp esi, ebx
je 0x40ffe8
mov edx, dword [esi]
push str.Administrators
push edx
call fcn.004246c7
add esp, 8
test eax, eax
je 0x40fff6
add edi, 1
add esi, 4
cmp edi, dword [esp + 0x30]
jb 0x40ffd0
jmp 0x40fffb
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x18]
push eax
call dword [esp + 0x20]
mov ecx, dword [esp + 0x20]
push ecx
call dword [esp + 0x20]
cmp byte [esp + 0x13], bl
jne 0x41004a
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x28]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push str.System
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x41004a
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x13], 1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, byte [esp + 0x13]
jmp 0x410069
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov ecx, dword [esp + 0x338]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004121f9
add esp, 0x32c
ret