Function at 0x49a970
Capabilities:
Get session user name

Disassembly:
push 0xffffffffffffffff
push 0x4ea0e1
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x50e74c]
xor eax, esp
mov dword [esp + 0x248], eax
push esi
push edi
mov eax, dword [0x50e74c]
xor eax, esp
push eax
lea eax, [esp + 0x25c]
mov dword fs:[0], eax
mov esi, ecx
lea edi, [esi + 0x84]
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov dword [esp + 0xc], esi
mov word [edi], ax
mov dword [esp + 0x264], eax
call fcn.0049ae00
mov eax, dword [0x70e114]
test al, 1
jne 0x49aa0c
or eax, 1
mov dword [0x70e114], eax
mov byte [esp + 0x264], 1
call fcn.0049c0e0
push 0x4ec360
call fcn.004c5734
add esp, 4
mov byte [esp + 0x264], 0
mov eax, dword [0x70e114]
cmp byte [0x70e220], 0
je 0x49ac7f
test al, 1
jne 0x49aa47
or eax, 1
mov dword [0x70e114], eax
mov byte [esp + 0x264], 2
call fcn.0049c0e0
push 0x4ec360
call fcn.004c5734
add esp, 4
mov byte [esp + 0x264], 0
xor eax, eax
mov dword [esp + 0x20], 0
push 0xffffffffffffffff
push eax
mov dword [esp + 0x2c], 0
lea ecx, [esp + 0x18]
push 0x70e118
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.00403000
mov byte [esp + 0x264], 3
mov eax, dword [0x70e114]
test al, 1
jne 0x49aaba
or eax, 1
mov dword [0x70e114], eax
mov byte [esp + 0x264], 4
call fcn.0049c0e0
push 0x4ec360
call fcn.004c5734
add esp, 4
mov byte [esp + 0x264], 3
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x49aad3
lea ecx, [esp + 0x10]
call fcn.00499390
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x49aaf7
cmp dword [esp + 0x24], 8
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x49aaf7
push 0x4fde08
lea ecx, [esp + 0x14]
call fcn.004794b0
xor eax, eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
mov byte [esp + 0x264], 5
push 0x208
push eax
mov word [esp + 0x4c], ax
lea eax, [esp + 0x4e]
push eax
call fcn.004cb700
add esp, 0xc
mov dword [esp + 0x40], 0x104
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
mov word [esp + 0x24a], ax
cmp word [esp + 0x44], ax
jne 0x49ab6b
xor ecx, ecx
jmp 0x49ab81
lea ecx, [esp + 0x44]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ab72
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x30]
call fcn.00403120
mov edx, str.__r_t_n
lea ecx, [esp + 0x28]
call fcn.00495510
mov edx, str.__r_t_n
lea ecx, [esp + 0x28]
call fcn.00495580
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.004033c0
push 1
push 0x4ffed0
lea ecx, [esp + 0x18]
call fcn.004794f0
push 0xffffffffffffffff
push 0
push 0x70e178
lea ecx, [esp + 0x1c]
call fcn.004033c0
push 0xc
push 0x4ffeb4
lea ecx, [esp + 0x18]
call fcn.004794f0
cmp byte [esp + 0x26c], 0
je 0x49ac08
push 0x4ffed4
lea ecx, [esp + 0x14]
call fcn.004794b0
lea eax, [esp + 0x10]
cmp edi, eax
je 0x49ac1c
push 0xffffffffffffffff
push 0
push eax
mov ecx, edi
call fcn.00403000
mov byte [esp + 0x264], 3
cmp dword [esp + 0x3c], 8
jb 0x49ac37
push dword [esp + 0x28]
call fcn.004c4eaa
add esp, 4
xor eax, eax
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
mov byte [esp + 0x264], al
cmp dword [esp + 0x24], 8
jb 0x49ac68
push dword [esp + 0x10]
call fcn.004c4eaa
add esp, 4
xor eax, eax
mov dword [esp + 0x24], 7
mov dword [esp + 0x20], 0
mov word [esp + 0x10], ax
mov dword [esp + 0x264], 0xffffffff
mov eax, esi
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.004c4eaf
add esp, 0x25c
ret 4