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

Disassembly:
sub esp, 0xa28
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0xa24], eax
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov ebp, dword [ebx]
push 0xff
xor esi, esi
lea eax, [esp + 0x135]
push esi
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x13c], 0
call fcn.004a0660
mov edi, dword [ebp + 0x95c]
mov dword [esp + 0x34], esi
mov eax, dword [ebp + 0x95c]
add esp, 0xc
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], 1
cmp eax, esi
je 0x4d5f25
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d5d47
sub eax, edx
cmp eax, 1
jbe 0x4d5f25
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d5d60
sub eax, edx
cmp eax, 0x41
jae 0x4d5d75
mov eax, 0x41
jmp 0x4d5d89
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d5d80
sub eax, edx
inc eax
push 1
push eax
call dword [0x659f4c]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4d5da4
lea eax, [esi + 0x1b]
jmp 0x4d63a3
mov al, byte [edi]
cmp al, 0x5b
jne 0x4d5e56
push 0x5d
push edi
lea ebx, [edi + 1]
call fcn.004a6380
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4d5ed5
mov ecx, ebp
sub ecx, ebx
push ecx
push ebx
push esi
call fcn.004f64d0
mov ebx, dword [esp + 0x2c]
add esp, 0xc
test ebp, ebp
je 0x4d5ed9
push 0x3a
push ebp
call fcn.004a6380
mov edi, eax
add esp, 8
test edi, edi
je 0x4d5ed9
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.004a4b6b
push eax
call fcn.004c1c10
movzx ebp, ax
push 0x2d
push edi
mov dword [esp + 0x3c], ebp
call fcn.004a6380
add esp, 0x18
test eax, eax
je 0x4d5ecc
push 0xa
inc eax
push 0
push eax
call fcn.004a4b6b
push eax
call fcn.004c1c10
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x4d5ed9
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
jmp 0x4d5ed9
cmp al, 0x3a
jne 0x4d5e61
mov ebp, edi
jmp 0x4d5dd9
push 0x3a
push edi
call fcn.004a6380
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4d5eb7
lea edx, [esp + 0x30]
push edx
push edi
push 0x17
call fcn.004e77e0
add esp, 0xc
cmp eax, 1
jne 0x4d5ea3
xor eax, eax
mov edx, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4d5e97
jmp 0x4d5ed9
mov eax, ebp
sub eax, edi
push eax
push edi
push esi
call fcn.004f64d0
add esp, 0xc
jmp 0x4d5dd9
mov edx, esi
mov eax, edi
sub edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4d5ec0
jmp 0x4d5ed9
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x4d5ed9
mov ebx, dword [esp + 0x20]
cmp byte [esi], 0
je 0x4d5f25
mov ecx, dword [ebx + 0x8c]
mov edx, dword [ebx + 0x50]
push 0x401
lea eax, [esp + 0x234]
push eax
mov eax, dword [edx + 0x18]
push esi
push ecx
push eax
call fcn.004f0a70
mov ecx, dword [ebx + 0x50]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.00546ad0
add esp, 0x18
sub eax, 0
je 0x4d5f85
sub eax, 1
je 0x4d5f7b
sub eax, 1
je 0x4d5fbf
mov edx, dword [ebx + 0x1a8]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4d5f89
push 0x80
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b6fe0
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.004c2150
push esi
call dword [0x659f40]
add esp, 0x1c
mov eax, 0x1e
jmp 0x4d63a3
mov edi, esi
jmp 0x4d5fc6
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x234]
push edx
cmp eax, 0x17
je 0x4d5fa8
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x4d5faf
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.004edd40
add esp, 0x10
mov dword [esp + 0x2c], 0
lea edi, [esp + 0x230]
lea ecx, [esp + 0x28]
push ecx
push 0
push edi
push ebx
call fcn.004c3e50
add esp, 0x10
cmp eax, 1
jne 0x4d5fea
lea edx, [esp + 0x28]
push edx
push ebx
call fcn.004bc0d0
add esp, 8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4d6006
mov ebp, dword [eax]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.004c4070
add esp, 8
test ebp, ebp
jne 0x4d602a
mov ecx, dword [esp + 0x14]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.004c2150
push esi
call dword [0x659f40]
add esp, 0x10
mov eax, 0x1e
jmp 0x4d63a3
push esi
call dword [0x659f40]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 4
mov dword [esp + 0x10], 0xffffffff
xor esi, esi
lea edx, [esp + 0x10]
push edx
push 0
push ebp
push ebx
call fcn.004c8840
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x4d606a
call edi
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x4d6044
jmp 0x4d606e
test ebp, ebp
jne 0x4d609e
push 0x80
lea eax, [esp + 0xb4]
push eax
push esi
call fcn.004b6fe0
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.004c2150
add esp, 0x18
mov eax, 0x1e
jmp 0x4d63a3
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.004a26d0
mov eax, dword [esp + 0x30]
mov edx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x1c], edx
movzx edi, ax
cmp ax, word [esp + 0x18]
ja 0x4d6204
mov esi, dword [esp + 0x2c]
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x10]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4d61fd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
je 0x4d6164
cmp eax, 0x2741
jne 0x4d6164
push 0x80
lea eax, [esp + 0xb4]
push eax
push 0x2741
call fcn.004b6fe0
mov esi, dword [esp + 0x20]
push eax
movzx ecx, di
push ecx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.004c2070
mov ecx, dword [ebx + 0x1a8]
add esp, 0x1c
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4d6181
movzx edi, word [esp + 0x24]
xor esi, esi
jmp 0x4d6171
cmp eax, 0x2740
je 0x4d6170
cmp eax, 0xd
jne 0x4d61be
inc edi
cmp di, word [esp + 0x18]
jbe 0x4d60d0
jmp 0x4d6204
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b6fe0
push eax
push str.getsockname___failed:__s
push esi
call fcn.004c2150
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.004c87c0
add esp, 0x20
mov eax, 0x1e
jmp 0x4d63a3
push 0x80
lea ecx, [esp + 0xb4]
push ecx
push eax
call fcn.004b6fe0
push eax
mov eax, dword [esp + 0x24]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.004c2150
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
call fcn.004c87c0
add esp, 0x24
mov eax, 0x1e
jmp 0x4d63a3
cmp di, word [esp + 0x18]
jbe 0x4d622b
mov edx, dword [esp + 0x14]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.004c2150
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.004c87c0
add esp, 0x10
mov eax, 0x1e
jmp 0x4d63a3
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4d6275
push 0x80
lea ecx, [esp + 0xb4]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b6fe0
mov edx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push edx
jmp 0x4d61a1
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4d62c7
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b6fe0
push eax
mov eax, dword [esp + 0x24]
push str.socket_failure:__s
push eax
call fcn.004c2150
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call fcn.004c87c0
add esp, 0x20
mov eax, 0x1e
jmp 0x4d63a3
push 0x100
lea edx, [esp + 0x134]
push edx
push ebp
call fcn.004c3380
mov eax, dword [ebx + 0x294]
add esp, 0xc
test eax, 0x40000
jne 0x4d62fc
test eax, 0x400
je 0x4d62fc
or eax, 0x40000
mov dword [ebx + 0x294], eax
mov edi, dword [esp + 0xa3c]
cmp edi, 2
je 0x4d636b
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
test dword [ebx + 0x294], 0x40000
jne 0x4d6323
test edi, edi
je 0x4d635e
cmp edi, 1
jne 0x4d632e
cmp cx, 2
jne 0x4d635e
movzx eax, cx
sub eax, 2
je 0x4d6342
sub eax, 0x15
jne 0x4d635e
mov eax, dword [esp + 0x32]
push eax
jmp 0x4d6347
mov ecx, dword [esp + 0x32]
push ecx
call esi
movzx ebp, ax
test edi, edi
je 0x4d63bc
cmp edi, 1
je 0x4d643e
mov cx, word [esp + 0x30]
inc edi
cmp edi, 2
jne 0x4d6313
mov dword [esp + 0xa3c], edi
mov eax, dword [esp + 0xa3c]
mov esi, ebx
mov dword [ebx + 0x410], eax
call fcn.004d5890
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x1ac], ecx
mov eax, 0x1c
mov ecx, ebx
mov dword [ebx + 0x290], 1
call fcn.004d5bb0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xa34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00499a1c
add esp, 0xa28
ret
xor ecx, ecx
cmp word [esp + 0x30], 2
movzx edx, bp
setne cl
push edx
lea eax, [esp + 0x134]
push eax
lea ebp, [ebx + 0x398]
mov dword [esp + 0xa44], edi
inc ecx
push ecx
push str.EPRT
push str._s__d_s_hu
push ebp
call fcn.004f0de0
mov edi, eax
add esp, 0x18
mov dword [esp + 0x20], edi
test edi, edi
je 0x4d636b
push edi
call fcn.004b68c0
mov edx, dword [esp + 0x18]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.004c2150
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.004c87c0
add esp, 0x18
xor eax, eax
mov ecx, ebx
mov dword [ebp + 0x78], 1
call fcn.004d5bb0
mov eax, edi
jmp 0x4d63a3
mov dword [esp + 0xa3c], edi
lea ecx, [esp + 0x634]
lea edx, [esp + 0x130]
mov al, byte [edx]
test al, al
je 0x4d646a
cmp al, 0x2e
jne 0x4d6462
mov byte [ecx], 0x2c
jmp 0x4d6464
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x4d6453
movzx eax, bp
mov edx, eax
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.004c9bd0
lea eax, [esp + 0x648]
push eax
push str.PORT
lea eax, [ebx + 0x398]
push 0x5ec56c
push eax
call fcn.004f0de0
mov edi, eax
add esp, 0x24
mov dword [esp + 0x20], edi
test edi, edi
je 0x4d636b
push edi
call fcn.004b68c0
mov ecx, dword [esp + 0x18]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.004c2150
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.004c87c0
add esp, 0x18
xor eax, eax
mov ecx, ebx
call fcn.004d5bb0
mov eax, edi
jmp 0x4d63a3