Function at 0x40f030
Capabilities:
Get process image filename
List tcp connections and listeners

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x448d60]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov byte [eax], 0
mov ecx, dword [ebp + 0xc]
mov byte [ecx], 0
mov dword [ebp - 0x10], 0x10
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40f070
xor eax, eax
jmp 0x40f2e3
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
push 0
push 4
push 2
push 0
lea edx, [ebp - 4]
push edx
push 0
call sub.IPHLPAPI.DLL_GetExtendedTcpTable
cmp eax, 0x7a
jne 0x40f0ab
mov eax, dword [ebp - 4]
push eax
call fcn.0042a62c
add esp, 4
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
je 0x40f2bf
push 0
push 4
push 2
push 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0xc]
push eax
call sub.IPHLPAPI.DLL_GetExtendedTcpTable
test eax, eax
jne 0x40f2ad
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0
jmp 0x40f0f4
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [edx]
jae 0x40f2ad
mov ecx, dword [ebp - 0x2c]
imul ecx, ecx, 0x18
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx + 0x18]
cmp eax, dword [ebp - 0x28]
je 0x40f2a8
mov ecx, dword [ebp - 0x2c]
imul ecx, ecx, 0x18
mov edx, dword [ebp - 0xc]
movzx eax, word [edx + ecx + 0xc]
movzx ecx, word [ebp - 0x22]
cmp eax, ecx
jne 0x40f2a8
mov edx, dword [ebp - 0x2c]
imul edx, edx, 0x18
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + edx + 8]
cmp ecx, dword [ebp - 0x20]
jne 0x40f2a8
mov edx, dword [ebp - 0x2c]
imul edx, edx, 0x18
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + edx + 0x18]
push ecx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x40f2a6
lea edx, [ebp - 0x34]
push edx
push 8
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f1db
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040ef70
add esp, 0x14
test eax, eax
je 0x40f1b4
mov eax, dword [ebp - 0x2c]
imul eax, eax, 0x18
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + eax + 0x18]
mov dword [ebp - 8], edx
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
push 0xc
mov ecx, dword [ebp + 0x20]
push ecx
push 0xc
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
mov ecx, dword [ebp + 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x30]
push edx
call sub.PSAPI.DLL_GetModuleFileNameExA
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x40f20d
push 0x104
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call sub.PSAPI.DLL_GetProcessImageFileNameA
mov dword [ebp - 0x38], eax
mov edx, dword [ebp + 0x1c]
add edx, dword [ebp - 0x38]
mov byte [edx], 0
mov eax, dword [ebp - 0x38]
add eax, 0xf
push eax
call fcn.0042a62c
add esp, 4
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x3c], 0
je 0x40f257
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp - 0x2c]
imul eax, eax, 0x18
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + eax + 0x18]
push edx
push str._lu__s
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0042a738
add esp, 0x10
cmp dword [ebp - 0x3c], 0
je 0x40f265
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x54], ecx
jmp 0x40f26c
mov dword [ebp - 0x54], 0x43638b
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push 0x6d
push 4
call fcn.0040e190
add esp, 0x14
cmp dword [ebp - 0x3c], 0
je 0x40f29c
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
push eax
call fcn.0042abed
add esp, 4
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f2ad
jmp 0x40f0eb
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x50]
push eax
call fcn.0042abed
add esp, 4
cmp dword [ebp - 8], 0
jne 0x40f2e0
push 0
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x6c
push 2
call fcn.0040e190
add esp, 0x14
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042a637
mov esp, ebp
pop ebp
ret