Function at 0x410750
Capabilities:
Get session user name

Disassembly:
sub esp, 0x32c
mov eax, dword [0x42d2ec]
xor eax, esp
mov dword [esp + 0x328], eax
call fcn.0040f890
test eax, eax
jne 0x410787
mov eax, 1
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00412c09
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 0x4107b9
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00412c09
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 0x4109bc
cmp ebp, ebx
je 0x4109bc
cmp dword [esp + 0x1c], ebx
je 0x4109bc
cmp eax, ebx
je 0x4109bc
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 0x410870
lea ecx, [esp + 0x28]
push ecx
push 1
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x244]
push eax
call fcn.0040f860
add esp, 8
push eax
push ebx
call ebp
test eax, eax
jne 0x410870
mov ecx, dword [esp + 0x28]
cmp dword [ecx + 0xc], 2
je 0x4109a5
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 0x410973
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 0x410895
lea edi, [esp + 0x38]
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4108b0
mov eax, dword [0x427cd4]
mov dword [edi], eax
mov eax, dword [esi]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4108c7
lea edi, [esp + 0x38]
sub eax, edx
add edi, 0xfffffffe
jmp 0x4108e0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4108e0
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 0x410964
mov esi, dword [esp + 0x18]
xor edi, edi
cmp dword [esp + 0x30], ebx
jbe 0x41095b
lea ebx, [ebx]
cmp esi, ebx
je 0x410948
mov edx, dword [esi]
push str.Administrators
push edx
call fcn.00425817
add esp, 8
test eax, eax
je 0x410956
add edi, 1
add esi, 4
cmp edi, dword [esp + 0x30]
jb 0x410930
jmp 0x41095b
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 0x4109aa
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 0x4109aa
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 0x4109c9
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.00412c09
add esp, 0x32c
ret