Function at 0x482ba0
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 sub.WTSAPI32.dll_WTSEnumerateSessionsExW
test eax, eax
je 0x482fbb
mov eax, dword [esp + 0x18]
test eax, eax
je 0x482faa
mov edi, dword [esp + 0x38]
xor ebp, ebp
mov ebx, 0x14
jmp 0x482c00
mov eax, dword [esp + 0x18]
inc ebp
add ebx, 0x20
cmp ebp, eax
jae 0x482faa
mov edx, dword [esp + 0x1c]
cmp dword [edx + ebx - 0x10], 0
jne 0x482bf4
mov eax, dword [edi]
mov esi, dword [edi + 8]
cmp esi, dword [edi + 0xc]
mov dword [esp + 8], edx
jne 0x482c40
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 sub.api_ms_win_crt_heap_l1_1_0.dll_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 0x482c9d
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
je 0x482cb4
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 0x482ccb
mov eax, dword [0x5052b0]
jmp 0x482cd7
mov dword [esi], 0
mov dword [esi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + 8], eax
jmp 0x482d0e
mov dword [esi], 0
mov dword [esi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + 8], eax
jmp 0x482d0a
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_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 0x482d61
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
je 0x482d79
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 0x482d91
mov eax, dword [0x5052b0]
jmp 0x482d9d
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x14], eax
jmp 0x482dd4
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x14], eax
jmp 0x482dd0
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_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 0x482e27
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
je 0x482e43
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 0x482e5b
mov eax, dword [0x5052b0]
jmp 0x482e67
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 0x482ea7
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov eax, dword [0x5052b0]
mov dword [esi + 0x2c], eax
jmp 0x482e9a
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_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 sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x482f33
mov ecx, dword [esp + 0xc]
cmp dword [ecx], 2
jne 0x482f2d
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 0x4fbf38
push dword [esp + 0x14]
call fcn.00472810
add esp, 0x18
mov ecx, dword [esp + 0xc]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
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 sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x482bf0
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 fcn.0040c948
add esp, 0x10
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
push edi
mov edi, dword [esp + 0x3c]
call sub.WTSAPI32.dll_WTSFreeMemory
jmp 0x482bf0
push 1
push dword [esp + 0x20]
push 2
call sub.WTSAPI32.dll_WTSFreeMemoryExW
xor eax, eax
jmp 0x482fc0
mov eax, str.WTSEnumerateSessionsW_WTS_CURRENT_SERVER_HANDLE__failed
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret