Function at 0x419020
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4d0
mov eax, dword [0x4620c8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 0x1a0], edi
mov dword [ebp - 0x1a8], 0
call fcn.00410cf0
add esp, 4
cmp byte [edi], 0x7e
mov esi, eax
mov dword [ebp - 0x1b0], esi
je 0x419080
push 0x24
push edi
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
jne 0x419080
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405fa8
mov esp, ebp
pop ebp
ret
xor edi, edi
cmp byte [esi], 0
push ebx
mov dword [ebp - 0x198], edi
je 0x419101
mov ebx, dword [sym.imp.MSVCR90.dll_strcspn]
cmp byte [esi], 0x24
jne 0x4190c9
lea ecx, [esi + 1]
lea esp, [esp]
mov al, byte [ecx]
cmp al, 0x30
jl 0x4190aa
cmp al, 0x39
jle 0x4190c0
cmp al, 0x61
jl 0x4190b2
cmp al, 0x7a
jle 0x4190c0
mov dl, al
sub dl, 0x41
cmp dl, 0x19
jbe 0x4190c0
cmp al, 0x5f
jne 0x4190c3
inc ecx
jmp 0x4190a0
sub ecx, esi
mov eax, ecx
jmp 0x4190d4
push 0x452f98
push esi
call ebx
add esp, 8
cmp edi, 0x64
jge 0x4191a2
mov dword [ebp + edi*4 - 0x4d0], esi
mov dword [ebp + edi*4 - 0x340], eax
mov byte [ebp + edi - 0xcc], 0
add esi, eax
inc edi
cmp byte [esi], 0
jne 0x419094
mov dword [ebp - 0x198], edi
xor eax, eax
mov dword [ebp - 0x1a4], eax
test edi, edi
jle 0x4192a3
jmp 0x419120
mov esi, dword [ebp + eax*4 - 0x4d0]
cmp byte [esi], 0x24
jne 0x419294
mov ebx, dword [ebp + eax*4 - 0x340]
cmp ebx, 1
je 0x419294
mov cl, byte [ebx + esi]
lea edi, [esi + 1]
push edi
mov byte [ebp - 0x199], cl
mov byte [ebx + esi], 0
call fcn.00406d70
push eax
call fcn.00410cf0
add esp, 8
test eax, eax
jne 0x419249
push 0x452f94
push edi
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4191c0
call dword [sym.imp.MSVCR90.dll__getpid]
push eax
push 0x446088
lea edx, [ebp - 0x68]
push 0x64
push edx
call fcn.0040fad0
lea eax, [ebp - 0x68]
push eax
call int.0040a6d0
add esp, 0x14
jmp 0x419249
mov eax, dword [ebp - 0x1a0]
push eax
push str.Util_ExpandString
push str._s:_Filename___s__has_too_many_chunks._n
call fcn.00412850
add esp, 0xc
jmp 0x41936d
push str.USER
push edi
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x41921b
lea ecx, [ebp - 0x1ac]
push ecx
lea edx, [ebp - 0x194]
push edx
mov dword [ebp - 0x1ac], 0x64
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x41920c
push 1
lea eax, [ebp - 0x194]
push 0xffffffffffffffff
push eax
call fcn.00406910
add esp, 0xc
test eax, eax
jne 0x419249
push str.unknown
call fcn.00410cf0
add esp, 4
jmp 0x419249
mov ecx, dword [ebp - 0x1a0]
push ecx
push edi
push str.Environment_variable__s_not_defined_in__s._n
call fcn.00412850
push 0x64
lea edx, [ebp - 0x68]
push esi
push edx
call fcn.0040fb30
push 0
lea eax, [ebp - 0x68]
push 0xffffffffffffffff
push eax
call fcn.00406910
add esp, 0x24
mov cl, byte [ebp - 0x199]
mov byte [ebx + esi], cl
mov ecx, dword [ebp - 0x1a4]
mov dword [ebp + ecx*4 - 0x4d0], eax
test eax, eax
je 0x419314
lea esi, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x419270
mov edi, dword [ebp - 0x198]
sub eax, esi
mov dword [ebp + ecx*4 - 0x340], eax
mov eax, dword [ebp - 0x1a4]
mov byte [ebp + ecx - 0xcc], 1
inc eax
cmp eax, edi
mov dword [ebp - 0x1a4], eax
jl 0x419120
xor ecx, ecx
xor edx, edx
xor eax, eax
cmp edi, 2
lea esi, [ecx + 1]
jl 0x4192d5
lea ebx, [edi - 1]
jmp 0x4192c0
add ecx, dword [ebp + eax*4 - 0x340]
add edx, dword [ebp + eax*4 - 0x33c]
add eax, 2
cmp eax, ebx
jl 0x4192c0
cmp eax, edi
jge 0x4192e1
mov esi, dword [ebp + eax*4 - 0x340]
inc esi
add edx, ecx
add edx, esi
push edx
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [ebp - 0x1a8], eax
test eax, eax
jne 0x419331
mov eax, dword [ebp - 0x1a0]
push eax
push str.Util_ExpandString
push str._s:_Cannot_allocate_memory_for_the_expansion_of___s_._n
call fcn.00412850
add esp, 0xc
jmp 0x41936d
mov edx, dword [ebp - 0x1a0]
push edx
push 0
push str.Util_ExpandString
push str._s:_Cannot_allocate_memory_to_expand___s__in___s_._n
call fcn.00412850
add esp, 0x10
jmp 0x419367
xor esi, esi
cmp dword [ebp - 0x198], esi
mov ebx, eax
jle 0x419364
lea ecx, [ecx]
mov edi, dword [ebp + esi*4 - 0x340]
mov ecx, dword [ebp + esi*4 - 0x4d0]
push edi
push ecx
push ebx
call sub.MSVCR90.dll_memcpy
inc esi
add esp, 0xc
add ebx, edi
cmp esi, dword [ebp - 0x198]
jl 0x419340
mov byte [ebx], 0
mov edi, dword [ebp - 0x198]
mov ebx, dword [sym.imp.MSVCR90.dll_free]
xor esi, esi
test edi, edi
jle 0x41939c
lea esp, [esp]
cmp byte [ebp + esi - 0xcc], 0
je 0x419397
mov edx, dword [ebp + esi*4 - 0x4d0]
push edx
call ebx
add esp, 4
inc esi
cmp esi, edi
jl 0x419380
mov eax, dword [ebp - 0x1b0]
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1a8]
add esp, 4
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00405fa8
mov esp, ebp
pop ebp
ret