Function at 0x4076b0
Capabilities:
Get session user name
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f487
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x5a2048]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x128], 0
cmp ecx, 3
ja case.0x407700.0
jmp dword [ecx*4 + 0x407a14]
push eax
lea ecx, [ebp - 0x114]
call fcn.00402200
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov edi, eax
lea eax, [ebp - 0x11c]
push eax
push 0
push 0
push 2
push edi
call dword [sym.imp.USER32.dll_GetUserObjectInformationW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x40779c
cmp eax, 0x7a
jne 0x40779c
push dword [ebp - 0x11c]
call fcn.0040acb6
add esp, 4
mov esi, eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x11c]
push esi
push 2
push edi
call dword [sym.imp.USER32.dll_GetUserObjectInformationW]
push 0x55087c
lea ecx, [ebp - 0x114]
call fcn.00407240
push esi
lea ecx, [ebp - 0x114]
call fcn.00407240
push esi
call fcn.0040acb1
add esp, 4
jmp 0x4077ac
push 0x550880
lea ecx, [ebp - 0x114]
call fcn.00407240
mov eax, dword [ebp - 0x114]
add eax, 0xfffffff0
push eax
call fcn.004028a0
mov edx, dword [ebp - 0x114]
add eax, 0x10
add edx, 0xfffffff0
mov dword [ebx], eax
add esp, 4
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4079f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4079f6
push eax
lea ecx, [ebp - 0x114]
call fcn.00402200
lea eax, [ebp - 0x120]
mov dword [ebp - 4], 1
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4077ac
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x11c]
push eax
push 0
push 0
push 0xa
push dword [ebp - 0x120]
call esi
push dword [ebp - 0x11c]
call fcn.0040acb6
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x11c]
push ebx
push 0xa
push dword [ebp - 0x120]
call esi
mov edi, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
push ebx
call fcn.0040acb1
add esp, 4
lea ecx, [ebp - 0x118]
call fcn.00401c90
push edi
push esi
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 2
push str.__08x_08x
push eax
call fcn.004032c0
mov esi, dword [ebp - 0x124]
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x114]
push eax
push esi
call fcn.004026e0
mov edx, dword [ebp - 0x118]
or edi, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 1
add esp, 0x1c
mov eax, edi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4078d7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x114]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x4078fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, esi
jmp 0x4079f8
push eax
lea ecx, [ebp - 0x118]
call fcn.00402200
lea eax, [ebp - 0x124]
mov dword [ebp - 4], 3
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x124], 0x40
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
or edi, 0xffffffff
test eax, eax
je 0x4079b1
push 0x40
lea eax, [ebp - 0x90]
push eax
push str._USERDOMAIN_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x120]
call fcn.00401c90
lea eax, [ebp - 0x110]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x120]
push str.__s__s
push eax
call fcn.004032c0
mov esi, dword [ebp - 0x120]
lea ecx, [ebp - 0x118]
add esp, 0x10
push dword [esi - 0xc]
push esi
call fcn.00407300
add esi, 0xfffffff0
mov byte [ebp - 4], 3
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4079b1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x118]
add eax, 0xfffffff0
push eax
call fcn.004028a0
mov edx, dword [ebp - 0x118]
add eax, 0x10
add edx, 0xfffffff0
mov dword [ebx], eax
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x4079f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4079f6
push eax
mov ecx, ebx
call fcn.00402200
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00526509
mov esp, ebp
pop ebp
ret