Function at 0x405910
Capabilities:
Get session user name

Disassembly:
sub esp, 0xbf8
xor eax, eax
mov ecx, 0x64
push ebx
push esi
push edi
lea edi, [esp + 0x2a4]
push ebp
rep stosd dword es:[edi], eax
lea edi, [esp + 0x118]
mov ecx, 0x64
rep stosd dword es:[edi], eax
lea edi, [esp + 0x438]
mov ecx, 0x64
rep stosd dword es:[edi], eax
xor ebx, ebx
push 0x40
mov byte [esp + 0x30], bl
mov byte [esp + 0x5c], bl
lea eax, [esp + 0x9c]
mov byte [esp + 0xdc], bl
mov byte [esp + 0x9c], bl
push eax
mov byte [esp + 0x40], bl
call fcn.00409e70
add esp, 8
test eax, eax
jne 0x405996
lea eax, [esp + 0x38]
push ebx
lea ecx, [esp + 0x9c]
push eax
push ecx
call fcn.00408ca0
add esp, 0xc
test eax, eax
je 0x405996
mov byte [esp + 0x38], bl
cmp byte [esp + 0x38], 0
jne 0x4059d1
lea eax, [esp + 0x38]
push 0x40
push eax
call fcn.00409150
add esp, 8
test eax, eax
je 0x4059d1
mov bx, word [0x423ff8]
mov eax, dword [str.NoName]
mov ecx, str.NoName
lea edx, [esp + 0x38]
mov cl, byte [ecx + 6]
mov dword [edx], eax
mov word [edx + 4], bx
mov byte [edx + 6], cl
mov eax, dword [esp + 0xc14]
push str.RNBO_SPN_LOCAL
push eax
call fcn.0041582d
add esp, 8
test eax, eax
jne 0x405a1d
mov eax, dword [str.RNBO_SPN_LOCAL]
mov ebx, dword [0x423fc0]
lea edx, [esp + 0x98]
mov ebp, dword [0x423fc4]
mov ecx, str.RNBO_SPN_LOCAL
mov dword [edx], eax
mov ax, word [ecx + 0xc]
mov dword [edx + 4], ebx
mov cl, byte [ecx + 0xe]
mov dword [edx + 8], ebp
mov word [edx + 0xc], ax
mov byte [edx + 0xe], cl
lea eax, [esp + 0x10]
lea ecx, [esp + 0x58]
mov dword [esp + 0x10], 0x40
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
jne 0x405a80
lea eax, [esp + 0xd8]
push 0x40
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.00409550
add esp, 0xc
cmp eax, 0xffffffff
je 0x405a80
lea edi, [esp + 0xd8]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405aa1
mov bx, word [0x423ff8]
mov eax, dword [str.NoName]
mov ecx, str.NoName
lea edx, [esp + 0x58]
mov cl, byte [ecx + 6]
mov dword [edx], eax
mov word [edx + 4], bx
mov byte [edx + 6], cl
lea eax, [esp + 0x14]
xor esi, esi
mov dword [eax], esi
mov dword [eax + 4], esi
mov dword [eax + 8], esi
lea eax, [esp + 0x20]
mov dword [eax], esi
lea ecx, [esp + 0x14]
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov eax, dword [esp + 0xc10]
and eax, 0xffff
push eax
push 0x423ff0
push ecx
call fcn.004134a5
mov ebx, dword [esp + 0xc18]
lea eax, [esp + 0x2c]
add esp, 0xc
mov ecx, dword [ebx + 0x6c]
push ecx
push 0x423ff0
push eax
call fcn.004134a5
lea ecx, [esp + 0x20]
lea edx, [esp + 0x44]
lea eax, [esp + 0xa4]
add esp, 0xc
push ecx
push edx
lea ecx, [esp + 0x60]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
push 5
push 0x423fec
call fcn.00408670
add esp, 0x1c
mov edx, eax
test edx, edx
jne 0x405b3e
push ebx
push 0x4a
call fcn.00406090
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
mov edi, edx
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x438]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00412dbf
lea ecx, [esp + 0x30]
lea eax, [esp + 0x43c]
add esp, 4
push ecx
push eax
push str.findFirstUnit
push 3
push 0x423810
call fcn.00408670
add esp, 0x14
mov edx, eax
test edx, edx
jne 0x405ba3
mov ax, 0x4a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
mov edi, edx
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x118]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00412dbf
lea ecx, [esp + 0x11c]
add esp, 4
push ecx
call fcn.00408770
add esp, 4
mov edx, eax
test edx, edx
jne 0x405bf7
mov ax, 0x4a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
mov edi, edx
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x118]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00412dbf
lea ecx, [esp + 0x2ac]
lea eax, [esp + 0x11c]
add esp, 4
push ecx
push ebx
push eax
call fcn.0040b050
add esp, 0xc
test ax, ax
je 0x405c59
push ebx
push eax
call fcn.00405fd0
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
lea eax, [esp + 0x2a8]
push eax
call fcn.00408440
add esp, 4
mov esi, eax
test esi, esi
jne 0x405c7e
mov ax, 0x42
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
lea eax, [esp + 0x2c]
xor ebp, ebp
lea edi, [esp + 0x5c8]
mov ecx, 0x64
mov dword [eax], ebp
mov dword [eax + 4], ebp
mov dword [eax + 8], ebp
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2a8]
lea eax, [esp + 0x5c8]
lea edx, [esp + 0x758]
push ecx
push eax
push edx
push esi
push 3
push 0x423810
call fcn.00408260
mov di, ax
add esp, 0x18
push esi
call fcn.00412dbf
add esp, 4
test di, di
je 0x405ce4
mov ax, 0x42
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
mov bp, 0
lea esi, [esp + 0x758]
mov edi, str.error
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x405d1a
lea eax, [esp + 0x5c8]
push eax
call fcn.00412742
mov bp, ax
add esp, 4
cmp bp, 0x46
jne 0x405dd9
lea eax, [esp + 0xa78]
lea ecx, [esp + 0x8e8]
lea edx, [esp + 0x2a8]
push eax
push ecx
push edx
push 2
push 0x423fec
call fcn.00408260
add esp, 0x14
test eax, eax
je 0x405d54
mov ax, 0x42
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret
lea eax, [esp + 0x8e8]
push eax
call fcn.00412742
mov word [ebx + 0x44], ax
add esp, 4
mov ax, word [esp + 0xc10]
mov word [ebx + 0x42], ax
mov ax, word [ebx + 0x74]
cmp ax, 1
je 0x405d84
cmp ax, 2
jne 0x405d95
mov eax, dword [esp + 0xc14]
push eax
push ebx
call fcn.00405810
add esp, 8
test bp, bp
je 0x405da0
cmp bp, 0x46
jne 0x405dd6
movsx esi, word [ebx + 0x5a]
inc esi
lea eax, [esp + 0xa78]
mov word [ebx + 0x5a], si
push eax
call fcn.00412742
mov word [ebx + esi*2 + 0x46], ax
add esp, 4
test bp, bp
jne 0x405dd6
lea eax, [ebx + 0x64]
push eax
call fcn.004138b4
mov dword [ebx + 0x68], 0x78
add esp, 4
mov ax, bp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xbf8
ret