Function at 0x41dedf
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x46f008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x29c], edx
xor ecx, ecx
mov dword [ebp - 0x298], ecx
mov dword [ebp - 0x290], ecx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x554]
movzx ebx, word [edi + 0x190]
mov dword [ebp - 0x2a0], eax
mov eax, dword [edi + 0x194]
mov dword [ebp - 0x294], eax
test esi, esi
jne 0x41df3a
test bx, bx
je 0x41e261
push 0x80
push ecx
lea eax, [ebp - 0x288]
push eax
call fcn.004520c0
add esp, 0xc
push 2
pop ecx
test esi, esi
je 0x41e126
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41df5f
sub ecx, edx
mov edx, 0xff
cmp ecx, edx
jae 0x41e123
mov al, byte [0x4574ab]
push edx
mov byte [ebp - 0x108], al
lea eax, [ebp - 0x107]
push 0
push eax
call fcn.004520c0
add esp, 0xc
push 3
push esi
push 0x4646a4
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41dfc1
add esi, 3
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.0041d6ad
add esp, 0xc
push 0x2d
pop eax
jmp 0x41e263
push 5
push esi
push str.host_
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41dfd9
add esi, 5
mov ecx, dword [ebp - 0x2a0]
push 2
pop edx
mov al, byte [ecx + 0x100]
mov byte [ebp - 0x289], al
mov eax, dword [ebp + 8]
cmp eax, edx
jne 0x41dffe
mov byte [ecx + 0x100], 1
jmp 0x41e009
cmp eax, 0x17
jne 0x41e009
mov byte [ecx + 0x100], dl
lea eax, [ebp - 0x290]
mov edx, esi
push eax
push 0
push 0
mov ecx, edi
call fcn.0042ea06
add esp, 0xc
cmp eax, 1
jne 0x41e034
push eax
lea edx, [ebp - 0x290]
mov ecx, edi
call fcn.00428ca8
pop ecx
mov eax, dword [ebp - 0x2a0]
mov cl, byte [ebp - 0x289]
mov byte [eax + 0x100], cl
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x41e111
mov ecx, dword [eax]
lea edx, [ebp - 0x108]
push pe_nt_image_headers32
call fcn.0042e310
mov eax, dword [ebp - 0x290]
pop ecx
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.0041d632
mov esi, dword [ebp - 0x290]
add esp, 0x18
mov edx, esi
mov ecx, edi
call fcn.0042ec6b
mov ecx, dword [esi]
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 4]
je 0x41e0ac
xor eax, eax
inc eax
jmp 0x41e263
push 0x17
pop esi
cmp eax, esi
jne 0x41e0d5
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x41e143
mov word [ebp - 0x288], si
jmp 0x41e135
push 2
pop ecx
cmp eax, ecx
jne 0x41e156
lea eax, [ebp - 0x284]
push eax
lea eax, [ebp - 0x108]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x41e156
push 2
pop eax
mov word [ebp - 0x288], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x286], ax
push 0x10
jmp 0x41e145
push esi
mov byte [edi + 0xd2f], 0
push str.Couldnt_bind_to__s
jmp 0x41dfb0
push 2
pop ecx
push 0x17
pop eax
cmp dword [ebp + 8], eax
jne 0x41e148
mov word [ebp - 0x288], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x286], ax
push 0x1c
pop esi
jmp 0x41e197
cmp dword [ebp + 8], ecx
jne 0x41e156
mov word [ebp - 0x288], cx
jmp 0x41e0ff
mov esi, dword [ebp - 0x298]
jmp 0x41e197
mov eax, dword [ebp - 0x294]
dec eax
mov dword [ebp - 0x294], eax
test eax, eax
jle 0x41e21c
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.0041d632
add esp, 0xc
inc ebx
push 2
pop eax
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x286], ax
push esi
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x29c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x41e15e
mov eax, 0x80
push eax
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.004520c0
add esp, 0xc
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x29c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x41e242
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x208]
push ecx
mov ecx, esi
mov dword [edi + 0x970], esi
call fcn.0041a0b8
pop ecx
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0041d6ad
add esp, 0x10
jmp 0x41dfb9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x108]
push ecx
mov ecx, esi
mov dword [edi + 0x970], esi
call fcn.0041a0b8
pop ecx
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x41e20e
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.0041d632
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
mov byte [eax + 0x287], 1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450ca6
leave
ret