Function at 0x41798f
Capabilities:
Get session user name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x425124]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x254], 0
xor eax, eax
and dword [ebp - 0x240], eax
cmp dword [ebp + 0x10], 9
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x250], edx
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], eax
mov word [ebp - 0x248], ax
jne 0x417a2e
mov eax, dword [esi]
push 0x10
push esi
mov esi, dword [eax + 0x70]
mov ecx, esi
call dword [0x42c30c]
call esi
lea ecx, [ebx + 0x61c]
call fcn.0041b73a
mov edx, dword [ebp - 0x23c]
push 0
movzx eax, ax
push eax
mov ecx, dword [edx]
push edx
mov esi, dword [ecx + 0x28]
mov ecx, esi
call dword [0x42c30c]
call esi
mov esi, dword [ebp - 0x23c]
cmp dword [ebp + 0x20], 0
lea ecx, [ebp - 0x240]
mov eax, dword [esi]
mov dword [ebp - 0x23c], eax
push ecx
je 0x417b16
push dword [ebp - 0x248]
mov ecx, dword [eax + 0x18]
push esi
call dword [0x42c30c]
mov eax, dword [ebp - 0x23c]
call dword [eax + 0x18]
mov dword [ebp - 0x23c], eax
test eax, eax
jns 0x417a90
push eax
call dword [0x42c084]
push 2
call fcn.00420b3b
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b387
mov eax, dword [ebp - 0x23c]
jmp 0x4180a0
push 0x224
lea eax, [ebp - 0x228]
push 0
push eax
call fcn.004215e1
add esp, 0xc
mov dword [ebp - 0x244], 0x112
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x228]
push eax
push 2
call dword [sym.imp.SspiCli.dll_GetUserNameExW]
test al, al
jne 0x417af0
call dword [0x42c08c]
mov esi, eax
test esi, esi
jle 0x417adf
movzx esi, si
or esi, 0x80070000
push 2
call fcn.00420b3b
mov edx, 0x10001
jmp 0x418096
mov eax, dword [esi]
lea ecx, [ebp - 0x228]
push ecx
push esi
mov esi, dword [eax + 0x50]
mov ecx, esi
call dword [0x42c30c]
call esi
mov esi, eax
test esi, esi
jns 0x417b32
push esi
call dword [0x42c084]
jmp 0x417adf
lea ecx, [ebp - 0x248]
push ecx
mov ecx, dword [eax + 0xc]
push esi
call dword [0x42c30c]
mov eax, dword [ebp - 0x23c]
call dword [eax + 0xc]
jmp 0x417b07
and dword [ebp - 0x24c], 0
cmp dword [ebx + 0x1bf4], 0
je 0x417b49
mov dword [edi + 0x1c], 2
lea ecx, [ebx + 0xbf0]
call fcn.0041bf7c
mov esi, dword [ebp + 0x18]
test eax, eax
jne 0x417b81
lea ecx, [ebx + 0x13f0]
call fcn.0041bf7c
test eax, eax
jne 0x417b81
lea ecx, [ebx + 0x15ec]
call fcn.0041bf7c
test eax, eax
jne 0x417b81
and dword [edi + 0x18], eax
and dword [edi + 0x14], eax
jmp 0x417b92
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x417b8b
mov dword [edi + 0x18], eax
test esi, esi
je 0x417b92
mov dword [edi + 0x14], esi
mov eax, dword [ebp + 0x10]
dec eax
cmp eax, 8
ja case.default.0x417bab
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x23c], ecx
xor ecx, ecx
inc ecx
jmp dword [eax*4 + 0x4180b3]
mov dword [edi + 0x20], ecx
mov word [edi + 0x24], cx
mov ecx, dword [ebx + 0x24]
call fcn.0041bf7c
test eax, eax
je 0x417bd0
mov ecx, dword [ebx + 0x24]
call fcn.0041b73a
mov dword [edi + 0x18], eax
lea ecx, [ebx + 0xbf0]
call fcn.0041bf7c
test eax, eax
jne 0x417bf3
lea ecx, [ebx + 0x13f0]
call fcn.0041bf7c
test eax, eax
jne 0x417bf3
mov esi, 0x5a0
mov dword [edi + 0x14], esi
jmp 0x417fae
mov dword [edi + 0x20], ecx
mov word [edi + 0x24], cx
mov ecx, dword [ebx + 0x24]
call fcn.0041bf7c
test eax, eax
je 0x417bd0
mov ecx, dword [ebx + 0x24]
call fcn.0041b73a
imul eax, eax, 0x3c
jmp 0x417bcd
xor esi, esi
inc esi
mov dword [edi + 0x20], esi
mov ecx, dword [ebx + 0x24]
call fcn.0041bf7c
test eax, eax
je 0x417c3a
mov ecx, dword [ebx + 0x24]
call fcn.0041b73a
movzx eax, ax
jmp 0x417c4b
lea ecx, [ebx + 0x224]
call fcn.0040d8b6
mov word [edi + 0x26], ax
mov eax, esi
mov word [edi + 0x24], ax
jmp 0x417fb1
xor esi, esi
mov dword [edi + 0x20], 2
inc esi
mov word [edi + 0x24], si
mov ecx, dword [ebx + 0x24]
call fcn.0041bf7c
test eax, eax
je 0x417c7a
mov ecx, dword [ebx + 0x24]
call fcn.0041b73a
mov word [edi + 0x24], ax
lea ecx, [ebx + 0x224]
call fcn.0040d8b6
mov word [edi + 0x26], ax
jmp 0x417fb1
mov ecx, dword [ebx + 0x24]
call fcn.0041bf7c
test eax, eax
je 0x417ea9
mov ecx, dword [ebx + 0x24]
call fcn.0041b73a
mov dword [ebp - 0x244], eax
lea ecx, [eax - 1]
cmp ecx, 0xb
ja 0x417cfc
lea esi, [ebx + 0x224]
mov ecx, esi
call fcn.0041bf7c
test eax, eax
jne 0x417ccc
xor esi, esi
inc esi
mov ecx, esi
jmp 0x417cd9
mov ecx, esi
call fcn.0041b73a
xor esi, esi
movzx ecx, ax
inc esi
dec ecx
mov dword [edi + 0x20], 3
mov eax, esi
shl eax, cl
mov ecx, dword [ebp - 0x244]
mov dword [edi + 0x24], eax
call fcn.0040df05
mov word [edi + 0x28], ax
jmp 0x417fb1
xor esi, esi
inc esi
cmp dword [ebx + 0x24], 0
je 0x417d69
push 0
push esi
mov ecx, 0x1f2
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417d34
mov ecx, dword [ebx + 0x24]
mov edx, 0x402318
push 0
push esi
call fcn.0041bf8b
test eax, eax
jne 0x417d69
mov edx, dword [ebp - 0x23c]
lea esi, [ebx + 0x420]
mov ecx, esi
mov dword [edi + 0x20], 3
call fcn.0040df8b
xor edx, edx
inc edx
lea ecx, [eax - 1]
shl edx, cl
mov ecx, esi
mov dword [edi + 0x24], edx
call fcn.0040db92
mov word [edi + 0x28], ax
jmp 0x417fae
push 0
push esi
mov ecx, 0x1d7
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417e75
mov ecx, dword [ebx + 0x24]
mov edx, 0x4022d4
push 0
push esi
call fcn.0041bf8b
test eax, eax
je 0x417e75
push 0
push esi
mov ecx, 0x1d8
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417e71
mov ecx, dword [ebx + 0x24]
mov edx, 0x4022e0
push 0
push esi
call fcn.0041bf8b
test eax, eax
je 0x417e71
push 0
push esi
mov ecx, 0x1d9
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417e6d
mov ecx, dword [ebx + 0x24]
mov edx, 0x4022f0
push 0
push esi
call fcn.0041bf8b
test eax, eax
je 0x417e6d
push 0
push esi
mov ecx, 0x1da
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417e68
mov ecx, dword [ebx + 0x24]
mov edx, 0x4022fc
push 0
push esi
call fcn.0041bf8b
test eax, eax
je 0x417e68
push 0
push esi
mov ecx, 0x1db
call fcn.0041b556
mov ecx, dword [ebx + 0x24]
mov edx, eax
call fcn.0041bf8b
test eax, eax
je 0x417e64
mov ecx, dword [ebx + 0x24]
mov edx, 0x40230c
push 0
push esi
call fcn.0041bf8b
test eax, eax
jne 0x417e79
push 5
jmp 0x417e6a
push 4
pop eax
jmp 0x417e7f
push 3
jmp 0x417e6a
push 2
jmp 0x417e6a
mov eax, esi
jmp 0x417e7f
mov eax, dword [ebp - 0x24c]
lea ecx, [ebx + 0x224]
mov dword [edi + 0x20], 4
mov word [edi + 0x24], ax
call fcn.0040d8b6
lea ecx, [ebx + 0x420]
mov word [edi + 0x26], ax
call fcn.0040db92
jmp 0x417cf3
lea ecx, [ebx + 0x420]
mov dword [edi + 0x20], 3
call fcn.0040db92
lea ecx, [ebx + 0x224]
mov word [edi + 0x28], ax
call fcn.0041b73a
xor esi, esi
movzx ecx, ax
inc esi
cmp ecx, esi
jbe 0x417ee1
dec ecx
mov eax, esi
shl eax, cl
mov dword [edi + 0x24], eax
jmp 0x417fb1
mov dword [edi + 0x24], esi
jmp 0x417fb1
lea eax, [ebp - 0x238]
push eax
call dword [0x42c1c4]
mov eax, dword [ebp - 0x250]
cmp dword [eax], 0
jne 0x417f44
movzx eax, word [ebp - 0x238]
imul ecx, eax, 0x64
movzx eax, word [ebp - 0x236]
add ecx, eax
movzx eax, word [ebp - 0x232]
imul edx, ecx, 0x64
add edx, eax
mov eax, dword [ebp - 0x23c]
movzx eax, ax
imul ecx, eax, 0x64
movzx eax, word [ebp + 0x28]
add ecx, eax
movzx eax, word [ebp + 0x2c]
imul ecx, ecx, 0x64
add ecx, eax
cmp ecx, edx
jge 0x417f8f
xor esi, esi
inc esi
jmp 0x417f4a
mov esi, dword [ebp - 0x254]
movzx eax, word [ebp - 0x230]
imul edx, eax, 0x3c
movzx eax, word [ebp - 0x22e]
add edx, eax
movzx eax, word [ebp + 0x30]
imul ecx, eax, 0x3c
movzx eax, word [ebp + 0x34]
add ecx, eax
cmp ecx, edx
jb 0x417f72
test esi, esi
je 0x417f8f
mov ecx, 0x228
call fcn.0041b556
push 2
mov esi, eax
call fcn.00420b3b
pop ecx
mov edx, esi
mov ecx, eax
call fcn.0041c015
and dword [edi + 0x20], 0
jmp 0x417fae
mov dword [edi + 0x20], 6
jmp 0x417fae
mov dword [edi + 0x20], 7
jmp 0x417fae
mov dword [edi + 0x20], 5
xor esi, esi
inc esi
mov ax, word [ebp + 0x34]
lea ecx, [ebx + 0xfe8]
mov word [edi + 0x12], ax
mov ax, word [ebp + 0x30]
mov word [edi + 0x10], ax
mov ax, word [ebp + 0x2c]
mov word [edi + 8], ax
mov ax, word [ebp + 0x28]
mov word [edi + 6], ax
mov eax, dword [ebp - 0x23c]
mov word [edi + 4], ax
call fcn.0041bf7c
test eax, eax
jne 0x417ff9
lea ecx, [ebx + 0xbf0]
call fcn.0041bf7c
test eax, eax
je 0x418014
mov ax, word [ebp + 0x40]
or dword [edi + 0x1c], esi
mov word [edi + 0xe], ax
mov ax, word [ebp + 0x3c]
mov word [edi + 0xc], ax
mov ax, word [ebp + 0x38]
mov word [edi + 0xa], ax
mov eax, dword [ebp - 0x240]
push edi
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x42c30c]
call esi
mov esi, eax
test esi, esi
jns 0x418075
push esi
call dword [0x42c084]
push 2
call fcn.00420b3b
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b387
lea eax, [ebx + 0x818]
mov ecx, 0x89
push eax
call fcn.0041b556
push eax
push 0
push 1
push 2
call fcn.00420b3b
pop ecx
push eax
call fcn.0041c26c
add esp, 0x14
jmp 0x41809e
xor eax, eax
jmp 0x4180a0
mov esi, 0x80004005
push esi
call dword [0x42c084]
call fcn.0041b266
push 2
call fcn.00420b3b
mov edx, 0x20001
pop ecx
mov ecx, eax
call fcn.0041b387
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00420460
leave
ret 0x40