Function at 0x482dd0
Capabilities:
Enumerate pe sections
Get session information

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov dword [esp + 0x20], 1
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x20]
push eax
push ecx
push 0
push edx
push 0
call sym._WTSEnumerateSessionsExW_20
test eax, eax
je 0x4831eb
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4831da
mov edi, dword [esp + 0x38]
xor ebp, ebp
mov ebx, 0x14
jmp 0x482e30
mov eax, dword [esp + 0x18]
inc ebp
add ebx, 0x20
cmp ebp, eax
jae 0x4831da
mov edx, dword [esp + 0x1c]
cmp dword [edx + ebx - 0x10], 0
jne 0x482e24
mov eax, dword [edi]
mov esi, dword [edi + 8]
cmp esi, dword [edi + 0xc]
mov dword [esp + 8], edx
jne 0x482e70
lea ecx, [esi + esi]
test esi, esi
mov edx, 0x10
cmove ecx, edx
mov dword [edi + 0xc], ecx
imul ecx, dword [edi + 4]
push ecx
push eax
call sym._realloc
mov edx, dword [esp + 0x10]
add esp, 8
mov dword [edi], eax
mov esi, dword [edi + 8]
lea ecx, [esi + 1]
mov dword [edi + 8], ecx
imul esi, dword [edi + 4]
add esi, eax
mov edi, dword [edx + ebx]
test edi, edi
je 0x482ecd
push edi
call sym._wcslen
add esp, 4
test eax, eax
je 0x482ee4
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0x24], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
inc ecx
mov dword [esi], ecx
mov dword [esp], eax
jne 0x482efb
mov eax, dword [0x5052b0]
jmp 0x482f07
mov dword [esi], 0
mov dword [esi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + 8], eax
jmp 0x482f3e
mov dword [esi], 0
mov dword [esi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + 8], eax
jmp 0x482f3a
push ecx
call sym._malloc
add esp, 4
mov byte [eax], 0
mov ecx, dword [esp + 4]
mov dword [esi + 8], eax
mov dword [esi + 4], 0
push 0
push 0
push dword [esp + 8]
push eax
push ecx
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esp]
mov dword [esi + 4], ecx
mov eax, dword [esi + 8]
mov byte [eax + ecx], 0
mov edx, dword [esp + 8]
mov edi, dword [edx + ebx - 4]
test edi, edi
je 0x482f91
push edi
call sym._wcslen
add esp, 4
test eax, eax
je 0x482fa9
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0x24], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
inc ecx
mov dword [esi + 0xc], ecx
mov dword [esp], eax
jne 0x482fc1
mov eax, dword [0x5052b0]
jmp 0x482fcd
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x14], eax
jmp 0x483004
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x14], eax
jmp 0x483000
push ecx
call sym._malloc
add esp, 4
mov byte [eax], 0
mov ecx, dword [esp + 4]
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], 0
push 0
push 0
push dword [esp + 8]
push eax
push ecx
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esp]
mov dword [esi + 0x10], ecx
mov eax, dword [esi + 0x14]
mov byte [eax + ecx], 0
mov edx, dword [esp + 8]
mov edi, dword [edx + ebx - 8]
test edi, edi
je 0x483057
push edi
call sym._wcslen
add esp, 4
test eax, eax
je 0x483073
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0x24], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
inc ecx
mov dword [esi + 0x24], ecx
mov dword [esp], eax
jne 0x48308b
mov eax, dword [0x5052b0]
jmp 0x483097
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x2c], eax
mov edi, dword [esp + 0x38]
jmp 0x4830d7
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x2c], eax
jmp 0x4830ca
push ecx
call sym._malloc
add esp, 4
mov byte [eax], 0
mov ecx, dword [esp + 4]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], 0
push 0
push 0
push dword [esp + 8]
push eax
push ecx
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esp]
mov dword [esi + 0x28], ecx
mov eax, dword [esi + 0x2c]
mov byte [eax + ecx], 0
mov eax, dword [0x5052b0]
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 8]
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], eax
mov dword [esi + 0x34], 0
mov dword [esi + 0x30], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x10]
push eax
push 0xe
push dword [edx + ebx - 0xc]
push 0
call sym._WTSQuerySessionInformationW_20
test eax, eax
je 0x483163
mov ecx, dword [esp + 0xc]
cmp dword [ecx], 2
jne 0x48315d
lea eax, [esi + 0x18]
mov dword [esp], eax
movzx edx, byte [ecx + 6]
movzx edi, byte [ecx + 7]
movzx eax, byte [ecx + 8]
movzx ecx, byte [ecx + 9]
push ecx
push eax
push edi
mov edi, dword [esp + 0x44]
push edx
push 0x4fc018
push dword [esp + 0x14]
call dbg.ffStrbufSetF
add esp, 0x18
mov ecx, dword [esp + 0xc]
push ecx
call sym._WTSFreeMemory_4
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push 0x18
mov eax, dword [esp + 0x14]
push dword [eax + ebx - 0xc]
push 0
call sym._WTSQuerySessionInformationW_20
test eax, eax
je 0x482e20
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xc8]
mov ecx, 0x2ac18000
add eax, ecx
mov ecx, dword [edi + 0xcc]
mov edx, 0xfe624e21
adc ecx, edx
push 0
push 0x2710
push ecx
push eax
call sym.___udivdi3
add esp, 0x10
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
push edi
mov edi, dword [esp + 0x3c]
call sym._WTSFreeMemory_4
jmp 0x482e20
push 1
push dword [esp + 0x20]
push 2
call sym._WTSFreeMemoryExW_12
xor eax, eax
jmp 0x4831f0
mov eax, str.WTSEnumerateSessionsW_WTS_CURRENT_SERVER_HANDLE__failed
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret