Function at 0x4024f0
Capabilities:
Get session user name

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405410
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x248
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], 0x101
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
lea esi, [ebp - 0x220]
mov dword [ebp - 0x224], 0
movups xmmword [ebp - 0x238], xmm0
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402576
sub esi, ecx
sar esi, 1
cmp esi, 0x7ffffffe
ja 0x402860
cmp esi, 7
ja 0x4025ce
mov dword [ebp - 0x228], esi
lea eax, [ebp - 0x220]
add esi, esi
mov dword [ebp - 0x224], 7
push esi
push eax
lea eax, [ebp - 0x238]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x238], ax
jmp 0x402675
mov edi, esi
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x402617
mov eax, 0x7fffffff
mov edi, 0x7ffffffe
add eax, eax
cmp eax, 0x1000
jb 0x402635
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40286a
push ecx
call fcn.00403df5
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x402830
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x40263e
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x7fffffff
ja 0x40286a
add eax, eax
jne 0x4025e7
jmp 0x40263e
push eax
call fcn.00403df5
add esp, 4
mov dword [ebp - 0x228], esi
lea ecx, [ebp - 0x220]
add esi, esi
mov dword [ebp - 0x258], eax
push esi
push ecx
push eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x224], edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x258]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax], cx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x238]
cmp dword [ebp - 0x224], 7
lea esi, [ebp - 0x238]
mov edi, dword [ebp - 0x238]
xorps xmm0, xmm0
mov eax, dword [ebp - 0x228]
cmova ecx, edi
cmova esi, edi
movups xmmword [ebp - 0x254], xmm0
lea edx, [ecx + eax*2]
cmp esi, edx
jne 0x4026c3
mov ecx, 0xf
mov byte [ebp - 0x254], 0
jmp 0x4027ce
sub edx, esi
mov dword [ebp - 0x240], 0xf
sar edx, 1
mov dword [ebp - 0x258], edx
cmp edx, 0x7fffffff
ja 0x402865
mov edi, 0xf
cmp edx, edi
jbe 0x40278a
mov edi, edx
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x40273a
mov ecx, 0x80000000
mov edi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.00403df5
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x402830
mov edx, dword [ebp - 0x258]
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x254], eax
mov dword [eax - 4], ecx
jmp 0x402790
mov eax, 0x16
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
test eax, eax
jne 0x402759
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x240], edi
jmp 0x402790
cmp eax, 0x1000
jb 0x40276d
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40286a
jmp 0x40270a
push eax
call fcn.00403df5
mov edx, dword [ebp - 0x258]
add esp, 4
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x240], edi
jmp 0x402790
mov eax, dword [ebp - 0x254]
cmp edi, 0xf
lea ecx, [ebp - 0x254]
mov edi, edx
cmova ecx, eax
mov dword [ebp - 0x258], ecx
test edx, edx
je 0x4027b8
mov al, byte [esi]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
lea esi, [esi + 2]
sub edi, 1
jne 0x4027a8
mov eax, dword [ebp - 0x258]
mov byte [eax + edx], 0
mov edi, dword [ebp - 0x238]
mov ecx, dword [ebp - 0x240]
cmp ecx, 0xf
jbe 0x402804
mov edx, dword [ebp - 0x254]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4027f4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402830
push ecx
push edx
call fcn.0040418b
mov edi, dword [ebp - 0x238]
add esp, 8
mov eax, dword [ebp - 0x224]
cmp eax, 7
jbe 0x402840
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x402836
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402836
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edi
call fcn.0040418b
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00403de7
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00401b00
call fcn.00401b00
call fcn.00401a60
int3