Function at 0x40c090
Capabilities:
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x1c], eax
xor eax, eax
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
cmp edx, 2
jne 0x40c0d0
mov eax, 0x4e4
mov dword [ecx + 0xb8], eax
mov eax, dword [esp + 0x1c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x40c0e0
add esp, 0x20
pop ebx
pop esi
pop edi
ret
cmp edx, 0x17
jne 0x46d642
mov eax, 0x4c0
jmp 0x40c0b3
call sub.cygwin1.dll___stack_chk_fail
nop
lea esi, [esi]
lea esi, [esi]
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov eax, dword [esp + 0x114]
mov dword [esp + 0x3c], pe_nt_image_headers32
mov edx, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0xec], edx
xor edx, edx
mov edi, dword [esp + 0x110]
mov edx, dword [eax + 0x18]
cmp edx, dword [eax + 8]
je 0x40c2bd
mov ecx, dword [eax + 0x24]
cmp edx, dword [eax + 0x1c]
je 0x40c268
lea eax, [esp + 0x3c]
lea ebx, [esp + 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [edx - 4]
mov dword [esp], eax
call sub.cygwin1.dll_getsockname
test eax, eax
js 0x46d74a
mov eax, dword [esp + 0x3c]
lea esi, [esp + 0xcc]
mov dword [esp], ebx
mov dword [esp + 0x18], 0x18
mov dword [esp + 0x14], 0x20
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call sub.cygwin1.dll_getnameinfo
mov ebx, eax
test eax, eax
jne 0x46d6be
mov dword [esp], esi
call sub.cygwin1.dll_strlen
mov edx, method.std::string.swap_std::string_
mov ebx, eax
test eax, eax
je 0x40c242
lea eax, [esp + 0x44]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00451170
lea edx, [eax + 0xc]
cmp ebx, 1
je 0x40c230
cmp ebx, 4
jb 0x40c280
mov ecx, dword [esp + 0xcc]
lea ebp, [eax + 0x10]
and ebp, 0xfffffffc
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + ebx + 0xc8]
mov dword [edx + ebx - 4], ecx
mov ecx, edx
sub ecx, ebp
sub esi, ecx
add ecx, ebx
and ecx, 0xfffffffc
cmp ecx, 4
jb 0x40c23b
mov dword [esp + 0x2c], eax
and ecx, 0xfffffffc
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov eax, dword [esi + ecx]
mov dword [ebp + ecx], eax
add ecx, 4
cmp ecx, dword [esp + 0x28]
jb 0x40c217
mov eax, dword [esp + 0x2c]
jmp 0x40c23b
movzx ecx, byte [esp + 0xcc]
mov byte [eax + 0xc], cl
cmp eax, sym.imp.cygstdc_6.dll_std::string::_Rep::_S_empty_rep_storage
jne 0x40c2a8
mov dword [edi], edx
mov eax, dword [esp + 0xec]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x40c2b8
add esp, 0xfc
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov edx, dword [ecx - 4]
add edx, 0x200
jmp 0x40c137
test ebx, ebx
je 0x40c23b
movzx ecx, byte [esp + 0xcc]
mov byte [eax + 0xc], cl
test bl, 2
je 0x40c23b
movzx ecx, word [esp + ebx + 0xca]
mov word [edx + ebx - 2], cx
jmp 0x40c23b
mov dword [eax + 8], 0
mov dword [eax], ebx
mov byte [eax + ebx + 0xc], 0
jmp 0x40c242
call sub.cygwin1.dll___stack_chk_fail
call fcn.0040b5a0
lea esi, [esi]
lea esi, [esi]
mov dword [esp], 0x10
lea edi, [esp + 0x18]
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp + 4], str.Unknown_address_family
mov esi, eax
lea eax, [esp + 0x17]
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.00467290
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00462400
mov dword [esp], edi
call fcn.004510f0
mov dword [esp + 8], 0x462650
mov dword [esp + 4], 0x47df0c
mov dword [esp], esi
call sub.cygstdc_6.dll___cxa_throw
mov ebx, eax
jmp 0x46d6ae
mov dword [esp], esi
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], ebx
call sub.cyggcc_s_1.dll__Unwind_Resume
mov dword [esp], 0x10
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp], ebx
mov esi, eax
call sub.cygwin1.dll_gai_strerror
mov ebx, eax
lea edi, [esp + 0x40]
lea eax, [esp + 0x3b]
mov dword [esp + 4], str.port:_getnameinfo:
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00467290
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00451158
mov edx, dword [eax]
lea ebp, [esp + 0x44]
mov dword [esp + 0x44], edx
mov dword [eax], method.std::string.swap_std::string_
mov dword [esp + 8], 0
mov dword [esp + 4], ebp
mov dword [esp], esi
call fcn.00462400
mov dword [esp], ebp
call fcn.004510f0
mov dword [esp], edi
call fcn.004510f0
mov dword [esp + 8], 0x462650
mov dword [esp + 4], 0x47df0c
mov dword [esp], esi
call sub.cygstdc_6.dll___cxa_throw
mov dword [esp], 0x10
call sub.cygstdc_6.dll___cxa_allocate_exception
mov esi, eax
call sub.cygwin1.dll___errno
mov ebx, dword [eax]
lea ebp, [esp + 0x44]
lea eax, [esp + 0x40]
mov dword [esp + 4], str.getsockname
mov dword [esp + 8], eax
mov dword [esp], ebp
call fcn.00467290
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], esi
call fcn.00462400
mov dword [esp], ebp
jmp 0x46d72d