Function at 0x1001d730
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b4
mov eax, dword [0x10042074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
push 0x100389e0
mov dword [ebp - 0x2a8], esi
call dword [sym.imp.mfc140.dll_Ordinal_1529]
push 0x100389e0
mov ecx, ebx
call dword [sym.imp.mfc140.dll_Ordinal_1529]
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x100
lea eax, [ebp - 0x204]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
mov dword [ebp - 0x2b4], 0x100
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x1001d99f
cmp dword [ebp - 0x288], 2
jne 0x1001d99f
push edi
lea eax, [ebp - 0x2a0]
push eax
lea eax, [ebp - 0x2ac]
push eax
call fcn.1001e100
mov eax, dword [ebp - 0x2ac]
add esp, 8
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x2a0]
lea eax, [eax + ecx*2]
cmp eax, 0x33
jae 0x1001d873
push 0xffffffffffffffff
push str.explorer.exe
call fcn.1001e220
add esp, 8
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
push edi
call fcn.1001e5b0
add esp, 0xc
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x1001d85d
mov ecx, dword [ebp - 0x2a8]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1529]
lea eax, [ebp - 0x204]
mov ecx, ebx
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1529]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1001d85d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSQuerySessionInformationA
push edi
call esi
push str.WTSFreeMemory
push edi
mov dword [ebp - 0x2b0], eax
call esi
mov esi, dword [ebp - 0x2b0]
mov dword [ebp - 0x2ac], eax
test esi, esi
je 0x1001d985
test eax, eax
je 0x1001d985
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a0], 0
push eax
lea eax, [ebp - 0x2a0]
mov dword [ebp - 0x29c], 0
push eax
push 5
push 0xffffffffffffffff
push 0
mov dword [ebp - 0x2a4], 0
call esi
test eax, eax
je 0x1001d8fc
push dword [ebp - 0x2a0]
jmp 0x1001d925
lea eax, [ebp - 0x2a4]
push eax
lea eax, [ebp - 0x2a0]
push eax
push 5
push 0xffffffffffffffff
push 0
call esi
test eax, eax
je 0x1001d91e
push dword [ebp - 0x2a0]
jmp 0x1001d925
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x2a8]
call dword [sym.imp.mfc140.dll_Ordinal_1529]
lea eax, [ebp - 0x2a4]
push eax
lea eax, [ebp - 0x29c]
push eax
push 7
push 0xffffffffffffffff
push 0
call esi
test eax, eax
je 0x1001d959
push dword [ebp - 0x29c]
mov ecx, ebx
call dword [sym.imp.mfc140.dll_Ordinal_1529]
mov eax, dword [ebp - 0x2a0]
mov esi, dword [ebp - 0x2ac]
test eax, eax
je 0x1001d96c
push eax
call esi
mov eax, dword [ebp - 0x29c]
test eax, eax
je 0x1001d979
push eax
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1001d85d
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2b4]
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [ebp - 0x104]
mov ecx, esi
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1529]
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
xor ecx, ebp
pop ebx
call fcn.100337f6
mov esp, ebp
pop ebp
ret