Function at 0x4066e0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x13c
mov ebx, dword [esp + 0x150]
cmp dword [ebx + 0x8c], 2
je 0x40676f
mov eax, dword [ebx + 0x270]
test eax, eax
jne 0x4067f3
mov eax, dword [ebx]
lea ebp, [esp + 0x2c]
lea esi, [esp + 0x30]
mov dword [esp + 0x2c], pe_nt_image_headers32
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [esp + 0x154]
mov dword [esp], eax
call dword [sym.imp.WSOCK32.DLL_getpeername]
sub esp, 0xc
test eax, eax
je 0x406810
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov dword [esp], ebx
mov esi, eax
mov dword [esp + 4], eax
call fcn.0040b230
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.getpeername___failed_with_errno__d:__s
mov dword [esp], edi
call fcn.0041b640
add esp, 0x13c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0xb8]
lea ecx, [ebx + 0x11c]
lea eax, [esp + 0xb0]
mov dword [ebx + 0x58], edx
mov edx, dword [edi + 4]
mov dword [ebx + 0x5c], edx
mov edx, dword [edi + 8]
mov dword [ebx + 0x60], edx
mov edx, dword [edi + 0xc]
mov dword [ebx + 0x64], edx
mov edx, dword [edi + 0x10]
mov dword [ebx + 0x68], edx
mov edx, dword [edi + 0x14]
mov dword [ebx + 0x6c], edx
mov edx, dword [edi + 0x18]
mov dword [ebx + 0x70], edx
mov edx, dword [edi + 0x1c]
mov dword [ebx + 0x74], edx
mov edx, dword [edi + 0x20]
mov dword [ebx + 0x78], edx
mov edx, dword [edi + 0x24]
mov dword [ebx + 0x7c], edx
mov edx, dword [edi + 0x28]
mov dword [ebx + 0x80], edx
movzx edx, word [edi + 0x2c]
mov word [ebx + 0x84], dx
lea edx, [ebx + 0xec]
call fcn.00406460
test eax, eax
je 0x4068e0
mov dword [esp], ebx
call fcn.004065c0
add esp, 0x13c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [esp + 0xb0]
mov ecx, 0x20
mov dword [esp + 0x2c], pe_nt_image_headers32
rep stosd dword es:[edi], eax
lea eax, [esp + 0xb0]
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x154]
mov dword [esp], eax
call dword [sym.imp.WSOCK32.DLL_getsockname]
sub esp, 0xc
test eax, eax
jne 0x4068a0
lea edi, [ebx + 0xb8]
lea ecx, [ebx + 0xe8]
mov eax, esi
mov edx, edi
call fcn.00406460
test eax, eax
jne 0x406780
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov esi, eax
call fcn.0040b230
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.ssrem_inet_ntop___failed_with_errno__d:__s
mov dword [esp], eax
call fcn.0041b640
jmp 0x40676f
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov esi, eax
call fcn.0040b230
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.getsockname___failed_with_errno__d:__s
mov dword [esp], eax
call fcn.0041b640
add esp, 0x13c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov esi, eax
call fcn.0040b230
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.ssloc_inet_ntop___failed_with_errno__d:__s
mov dword [esp], eax
call fcn.0041b640
jmp 0x40676f