Function at 0x412300
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10], 0
call fcn.00403600
mov ebx, eax
push edi
mov dword [ebp - 0x14], ebx
call fcn.00403640
push 0x437250
mov esi, eax
call fcn.00403640
add esp, 0xc
cmp eax, esi
jg 0x412364
mov cl, byte [eax + edi]
and cl, 0xc0
cmp cl, 0x80
je 0x412364
push 0
push eax
push 0
push 0x437250
push eax
push 0
push edi
call fcn.00403d30
add esp, 0x1c
test eax, eax
sete al
test al, al
jne 0x412388
push 0xffffffffffffffff
push 0
push 0x43724c
push 0xffffffffffffffff
push 0
push edi
call fcn.00403a80
add esp, 0x18
cmp eax, 0xffffffff
jne 0x412388
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
cmp byte [ebx], 0
mov dword [ebp - 8], edi
mov esi, ebx
je 0x41240a
mov ebx, dword [sym.imp.MSVCR80.dll_strcspn]
lea ebx, [ebx]
cmp byte [esi], 0x24
jne 0x4123d3
lea ecx, [esi + 1]
mov al, byte [ecx]
cmp al, 0x30
jl 0x4123b2
cmp al, 0x39
jle 0x4123c8
cmp al, 0x61
jl 0x4123ba
cmp al, 0x7a
jle 0x4123c8
mov dl, al
sub dl, 0x41
cmp dl, 0x19
jbe 0x4123c8
cmp al, 0x5f
jne 0x4123cd
add ecx, 1
jmp 0x4123a8
sub ecx, esi
mov eax, ecx
jmp 0x4123de
push 0x43724c
push esi
call ebx
add esp, 8
cmp edi, 0x64
jge 0x4124b7
mov dword [ebp + edi*4 - 0x400], esi
mov dword [ebp + edi*4 - 0x270], eax
mov byte [ebp + edi - 0xe0], 0
add esi, eax
add edi, 1
cmp byte [esi], 0
jne 0x4123a0
mov dword [ebp - 8], edi
xor eax, eax
test edi, edi
mov dword [ebp - 0xc], eax
jle 0x41259e
jmp 0x412420
mov esi, dword [ebp + eax*4 - 0x400]
cmp byte [esi], 0x24
jne 0x412590
mov ebx, dword [ebp + eax*4 - 0x270]
cmp ebx, 1
je 0x412590
mov cl, byte [ebx + esi]
lea edi, [esi + 1]
push edi
mov byte [ebp - 1], cl
mov byte [ebx + esi], 0
call fcn.004068c0
push eax
call fcn.00403600
add esp, 8
test eax, eax
jne 0x412553
push 0x437248
push edi
call dword [sym.imp.MSVCR80.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4124d3
call dword [sym.imp.MSVCR80.dll__getpid]
push eax
push 0x434b20
lea edx, [ebp - 0x7c]
push 0x64
push edx
call fcn.004055f0
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.MSVCR80.dll__strdup]
add esp, 0x14
test eax, eax
jne 0x412553
push 0x364
push 0x4370d4
push 0x42eddc
call fcn.00405580
mov eax, dword [ebp + 8]
push eax
call fcn.00403630
push eax
push 0x4371f8
call fcn.004120c0
add esp, 0xc
jmp 0x412639
push 0x4371f0
push edi
call dword [sym.imp.MSVCR80.dll__stricmp]
add esp, 8
test eax, eax
jne 0x412528
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x4c8]
push edx
mov dword [ebp - 0x18], 0x64
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x412519
push 1
lea eax, [ebp - 0x4c8]
push 0xffffffffffffffff
push eax
call fcn.00403490
add esp, 0xc
test eax, eax
jne 0x412553
push 0x4371e8
call fcn.00403600
add esp, 4
jmp 0x412553
mov ecx, dword [ebp + 8]
push ecx
push edi
push 0x4371b8
call fcn.00406ce0
push 0x64
lea edx, [ebp - 0x7c]
push esi
push edx
call fcn.00405650
push 0
lea eax, [ebp - 0x7c]
push 0xffffffffffffffff
push eax
call fcn.00403490
add esp, 0x24
test eax, eax
mov cl, byte [ebp - 1]
mov edx, dword [ebp - 0xc]
mov byte [ebx + esi], cl
mov dword [ebp + edx*4 - 0x400], eax
je 0x4125e8
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x412570
mov edi, dword [ebp - 8]
sub eax, esi
mov dword [ebp + edx*4 - 0x270], eax
mov eax, dword [ebp - 0xc]
mov byte [ebp + edx - 0xe0], 1
add eax, 1
cmp eax, edi
mov dword [ebp - 0xc], eax
jl 0x412420
xor eax, eax
test edi, edi
mov ecx, 1
jle 0x4125be
lea esp, [esp]
add ecx, dword [ebp + eax*4 - 0x270]
add eax, 1
cmp eax, edi
jl 0x4125b0
push ecx
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x412606
mov eax, dword [ebp + 8]
push eax
call fcn.00403630
push eax
push 0x437158
call fcn.004120c0
add esp, 0xc
jmp 0x412639
mov edx, dword [ebp + 8]
push edx
call fcn.00403630
push eax
push 0
push 0x4370f8
call fcn.004120c0
mov edi, dword [ebp - 8]
add esp, 0x10
jmp 0x412639
xor esi, esi
test edi, edi
mov ebx, eax
jle 0x412636
mov edi, edi
mov edi, dword [ebp + esi*4 - 0x270]
mov ecx, dword [ebp + esi*4 - 0x400]
push edi
push ecx
push ebx
call sub.MSVCR80.dll_memcpy
add esi, 1
add esp, 0xc
add ebx, edi
cmp esi, dword [ebp - 8]
jl 0x412610
mov edi, dword [ebp - 8]
mov byte [ebx], 0
mov ebx, dword [sym.imp.MSVCR80.dll_free]
xor esi, esi
test edi, edi
jle 0x412663
cmp byte [ebp + esi - 0xe0], 0
je 0x41265c
mov edx, dword [ebp + esi*4 - 0x400]
push edx
call ebx
add esp, 4
add esi, 1
cmp esi, edi
jl 0x412645
mov eax, dword [ebp - 0x14]
push eax
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret