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

Disassembly:
sub esp, 0x218
mov eax, dword [0x5bafe0]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push ebx
push ebp
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
movzx ebp, word [edi + 0x180]
mov esi, dword [edi + 0x39c]
push 0xff
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x184]
lea ecx, [esp + 0x129]
push ebx
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], eax
mov byte [esp + 0x130], bl
call fcn.00530110
add esp, 0xc
cmp esi, ebx
jne 0x4e6434
cmp bp, bx
je 0x4e67fe
push 0x80
lea edx, [esp + 0x28]
push ebx
push edx
call fcn.00530110
add esp, 0xc
test esi, esi
je 0x4e66c4
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e6454
sub eax, edx
cmp eax, 0xff
jae 0x4e66c4
mov edx, dword [0x5ba030]
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e6473
sub eax, ebp
push eax
push esi
push edx
call fcn.0052fd13
add esp, 0xc
test eax, eax
jne 0x4e64f4
mov eax, dword [0x5ba030]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e6493
sub eax, edx
add esi, eax
mov ebx, 1
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x88]
mov ebp, dword [esp + 0x234]
push pe_nt_image_headers32
lea eax, [esp + 0x128]
push eax
push esi
push edx
push ebp
call fcn.0048d590
add esp, 0x14
sub eax, 0
je 0x4e6537
dec eax
je 0x4e652d
dec eax
jne 0x4e654f
push ebp
lea eax, [esp + 0x128]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.004e4180
add esp, 0x14
jmp 0x4e6612
mov edx, dword [str.host_]
mov eax, edx
lea ebp, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e6500
sub eax, ebp
push eax
push esi
push edx
call fcn.0052fd13
add esp, 0xc
test eax, eax
jne 0x4e64a3
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e6520
sub eax, edx
add esi, eax
jmp 0x4e6557
mov eax, 1
jmp 0x4e6830
test ebx, ebx
je 0x4e6557
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.004e4210
add esp, 0xc
jmp 0x4e682b
test ebx, ebx
jne 0x4e66b0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x234]
mov ebp, dword [ecx + 0x2c8]
mov ebx, ecx
cmp eax, 2
jne 0x4e657b
mov dword [ebx + 0x2c8], 1
jmp 0x4e658c
cmp eax, 0x17
jne 0x4e658c
mov edx, ecx
mov dword [edx + 0x2c8], 2
lea eax, [esp + 0x1c]
push eax
push 0
push esi
push ebx
call fcn.004dae30
add esp, 0x10
cmp eax, 1
jne 0x4e65b0
lea ecx, [esp + 0x1c]
push ecx
push ebx
call fcn.004d9ec0
add esp, 8
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x2c8], ebp
test eax, eax
je 0x4e66b0
mov eax, dword [eax]
push pe_nt_image_headers32
lea edx, [esp + 0x128]
push edx
push eax
call fcn.004dab20
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x240]
push eax
lea ecx, [esp + 0x134]
push ecx
push edx
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.004e4180
mov eax, dword [esp + 0x40]
push eax
push edi
call fcn.004db050
mov ebp, dword [esp + 0x260]
add esp, 0x2c
cmp ebp, 0x17
jne 0x4e6686
lea ecx, [esp + 0x124]
push 0x25
push ecx
call fcn.00530640
mov esi, eax
add esp, 8
test esi, esi
je 0x4e6633
mov byte [esi], 0
inc esi
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x128]
push eax
push 0x17
call fcn.004ea540
add esp, 0xc
test eax, eax
jle 0x4e6679
mov edx, dword [esp + 0x18]
mov ecx, 0x17
push edx
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
test esi, esi
je 0x4e6679
push esi
call fcn.0052fde9
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], 0x1c
jmp 0x4e670b
cmp ebp, 2
jne 0x4e670b
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x128]
push ecx
push ebp
call fcn.004ea540
add esp, 0xc
test eax, eax
jle 0x4e670b
mov eax, dword [esp + 0x18]
push eax
jmp 0x4e66ee
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.004e4210
add esp, 0xc
jmp 0x4e682b
mov eax, dword [esp + 0x234]
cmp eax, 0x17
jne 0x4e66e8
mov ecx, eax
push ebp
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x1c
jmp 0x4e6706
cmp eax, 2
jne 0x4e670b
push ebp
mov edx, 2
mov word [esp + 0x28], dx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x10
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x230]
mov ebp, dword [sym.imp.WS2_32.dll_bind]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call ebp
test eax, eax
jns 0x4e677c
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
nop
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4e6802
mov ebx, dword [esp + 0x18]
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.004e4180
add esp, 0xc
inc ebx
push ebx
mov dword [esp + 0x1c], ebx
call esi
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
mov word [esp + 0x2a], ax
mov eax, dword [esp + 0x234]
push edx
push eax
call ebp
test eax, eax
js 0x4e6730
push 0x80
lea ecx, [esp + 0xa8]
push 0
push ecx
mov dword [esp + 0x2c], 0x80
call fcn.00530110
mov ecx, dword [esp + 0x23c]
add esp, 0xc
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0xa8]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4e67dc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
mov esi, eax
push esi
push edx
mov dword [edi + 0x85fc], esi
call fcn.004e9aa0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4e6822
movzx eax, word [esp + 0x18]
push eax
push str.Local_port:__hu_n
push edi
call fcn.004e4180
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ecx + 0x2a8], 1
xor eax, eax
jmp 0x4e6830
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
mov esi, eax
push esi
push edx
mov dword [edi + 0x85fc], esi
call fcn.004e9aa0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.004e4210
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052b755
add esp, 0x218
ret