Function at 0x401f6c
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x1b4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0x90
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 8], 4
jne 0x401fe7
mov dword [ebp - 0xc], 2
jmp 0x401ff4
cmp dword [ebp + 8], 6
jne 0x401ff4
mov dword [ebp - 0xc], 0x17
mov dword [ebp - 0x48], 0x170
mov ebx, dword [ebp - 0x48]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call eax
sub esp, 0xc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x402045
mov dword [esp + 4], str.Memory_allocation_failed_for_IP_ADAPTER_ADDRESSES_struct
mov dword [esp], 0
call dbg.error
mov eax, 8
jmp 0x4024ee
lea eax, [ebp - 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._GetAdaptersAddresses_20
sub esp, 0x14
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4020c8
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
sub esp, 0xc
cmp dword [ebp - 0x2c], 0x6f
je 0x401ffb
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Call_to_GetAdaptersAddresses_failed_with_error:__d
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dbg.error
mov eax, dword [ebp - 0x2c]
jmp 0x4024ee
nop
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
jmp 0x4024be
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x40]
cmp eax, 6
jne 0x4024b4
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 0x10]
lea ecx, [edx + 0x2c]
mov dword [esp + 0xc], 0x12
lea edx, [ebp - 0x5a]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call dbg.mac_to_str
test eax, eax
jne 0x402133
mov dword [esp + 4], str.Invalid_mac_address
mov dword [esp], 0
call dbg.error
mov eax, 0x57
jmp 0x4024ee
lea eax, [ebp - 0x5a]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.netinfo_search_mac
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4021f5
call dbg.netinfo_new
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40217e
mov dword [esp + 4], str.Error_allocating_memory_for_netinfo
mov dword [esp], 0
call dbg.error
mov eax, 8
jmp 0x4024ee
mov dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x5a]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._strcpy
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x118], edx
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 0x12]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x104
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov eax, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call eax
sub esp, 0x20
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x38]
and eax, 4
test eax, eax
je 0x402211
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x130], 1
jmp 0x40221e
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x130], 0
cmp dword [ebp - 0xc], 0x17
jne 0x402231
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x134], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
jmp 0x402398
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0xc]
mov dword [esp + 8], 0x64
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.socket_address_to_str
test eax, eax
jns 0x402293
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.netinfo_free
mov dword [esp + 4], str.Invalid_IP_address
mov dword [esp], 0
call dbg.error
mov eax, 0x57
jmp 0x4024ee
cmp dword [ebp - 0xc], 2
jne 0x4022e2
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x2c]
movzx eax, al
mov edx, 0x20
sub edx, eax
mov eax, 0xffffffff
mov ecx, edx
shr eax, cl
mov dword [ebp - 0x60], eax
mov dword [esp + 0xc], 0x64
lea eax, [ebp - 0xc4]
mov dword [esp + 8], eax
lea eax, [ebp - 0x60]
mov dword [esp + 4], eax
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_inet_ntop]
call eax
sub esp, 0x10
jmp 0x402325
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x2c]
movzx eax, al
mov dword [esp + 8], eax
mov dword [esp + 4], 0x410312
lea eax, [ebp - 0xc4]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x402325
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x134], 0
mov dword [ebp - 0x24], 1
lea eax, [ebp - 0xc4]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x128]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__s
lea eax, [ebp - 0x18c]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp - 0x1c]
add eax, 0x11c
mov dword [esp + 4], eax
lea eax, [ebp - 0x18c]
mov dword [esp], eax
call dbg.namelist_add
cmp dword [ebp - 0xc], 0x17
jne 0x40238f
cmp dword [ebp - 0x24], 0
jne 0x40238f
mov eax, dword [ebp - 0x1c]
add eax, 0x128
mov dword [esp + 4], eax
lea eax, [ebp - 0x18c]
mov dword [esp], eax
call dbg.namelist_add
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40223f
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x18], eax
jmp 0x40241d
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0xc]
mov dword [esp + 8], 0x64
lea eax, [ebp - 0xc4]
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.socket_address_to_str
test eax, eax
jns 0x4023fa
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.netinfo_free
mov dword [esp + 4], str.Invalid_DNS_address
mov dword [esp], 0
call dbg.error
mov eax, 0xffffffff
jmp 0x4024ee
mov eax, dword [ebp - 0x1c]
add eax, 0x124
mov dword [esp + 4], eax
lea eax, [ebp - 0xc4]
mov dword [esp], eax
call dbg.namelist_add
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4023ad
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xa4]
test eax, eax
je 0x40249a
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xa4]
lea edx, [eax + 0xc]
mov dword [esp + 8], 0x64
lea eax, [ebp - 0xc4]
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.socket_address_to_str
test eax, eax
jns 0x402480
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.netinfo_free
mov dword [esp + 4], str.Invalid_GW_address
mov dword [esp], 0
call dbg.error
mov eax, 0x57
jmp 0x4024ee
mov eax, dword [ebp - 0x1c]
add eax, 0x12c
mov dword [esp + 4], eax
lea eax, [ebp - 0xc4]
mov dword [esp], eax
call dbg.namelist_add
cmp dword [ebp - 0x20], 0
je 0x4024b5
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.netinfo_add
jmp 0x4024b5
nop
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4020d4
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 4]
leave
ret