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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9bc
mov eax, dword [0x74b738]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
lea eax, [ebp - 0x108]
push 0x100
push 0
push eax
mov esi, dword [edi]
mov ebx, edx
mov dword [ebp - 0x9bc], edi
mov dword [ebp - 0x99c], esi
call sub.VCRUNTIME140.dll_memset
mov esi, dword [esi + 0x364]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x9ac], eax
mov dword [ebp - 0x9b0], eax
mov dword [ebp - 0x9a0], eax
mov dword [ebp - 0x9a4], eax
mov byte [ebp - 0x995], 1
mov dword [ebp - 0x994], eax
test esi, esi
je 0x4cb5fa
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb418
sub ecx, edx
cmp ecx, 1
jbe 0x4cb5fa
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb430
sub ecx, edx
cmp ecx, 0x16
jae 0x4cb445
mov ecx, 0x16
jmp 0x4cb459
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb450
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x74b968]
add esp, 8
mov dword [ebp - 0x994], eax
test eax, eax
jne 0x4cb488
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a1e
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
mov eax, dword [sym.imp.VCRUNTIME140.dll_strchr]
je 0x4cb4c9
push 0x3a
push esi
call eax
add esp, 8
mov dword [ebp - 0x9b8], eax
test eax, eax
je 0x4cb542
mov ecx, eax
mov eax, dword [ebp - 0x994]
sub ecx, esi
push ecx
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov esi, dword [ebp - 0x9b8]
add esp, 0xc
mov eax, dword [sym.imp.VCRUNTIME140.dll_strchr]
test esi, esi
je 0x4cb55d
push 0x3a
push esi
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x4cb55d
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
add esp, 0xc
mov ecx, eax
call fcn.004b9a30
movzx eax, ax
push 0x2d
push esi
mov dword [ebp - 0x9a0], eax
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x4cb531
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
add esp, 0xc
mov ecx, eax
call fcn.004b9a30
movzx ecx, ax
mov dword [ebp - 0x9a4], ecx
jmp 0x4cb55d
mov eax, dword [ebp - 0x9a0]
movzx ecx, ax
mov dword [ebp - 0x9a4], ecx
jmp 0x4cb55d
mov ecx, dword [ebp - 0x994]
sub ecx, esi
nop word [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4cb550
mov esi, dword [ebp - 0x9a4]
xor ecx, ecx
cmp word [ebp - 0x9a0], si
movzx eax, si
cmovbe ecx, eax
mov eax, dword [ebp - 0x9a0]
movzx edx, cx
xor ecx, ecx
cmp word [ebp - 0x9a0], si
mov esi, dword [ebp - 0x994]
movzx eax, ax
cmovbe ecx, eax
movzx ecx, cx
cmp byte [esi], 0
je 0x4cb5e8
sub esp, 0x10
call fcn.004c2370
add esp, 0x10
sub eax, 0
je 0x4cb5c4
sub eax, 1
je 0x4cbbd6
sub eax, 1
jne 0x4cb5ce
lea eax, [ebp - 0x510]
mov dword [ebp - 0x9ac], eax
jmp 0x4cb5d0
mov eax, esi
mov dword [ebp - 0x9ac], eax
jmp 0x4cb5d0
xor eax, eax
mov dword [ebp - 0x9a0], ecx
mov ecx, edx
mov dword [ebp - 0x9a4], ecx
test eax, eax
jne 0x4cb681
jmp 0x4cb5fc
mov eax, ecx
mov dword [ebp - 0x9a0], eax
mov eax, edx
mov dword [ebp - 0x9a4], eax
jmp 0x4cb5fc
xor esi, esi
lea eax, [ebp - 0x9a8]
mov dword [ebp - 0x9a8], 0x80
push eax
lea eax, [ebp - 0x990]
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4cb64d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x99c]
call fcn.004ac430
add esp, 0xc
push esi
jmp 0x4cbbcd
movzx ecx, word [ebp - 0x990]
lea eax, [ebp - 0x510]
push 0x401
push eax
lea edx, [ebp - 0x98c]
call fcn.004c2420
lea eax, [ebp - 0x510]
mov byte [ebp - 0x995], 0
add esp, 8
mov dword [ebp - 0x9ac], eax
lea ecx, [ebp - 0x9b0]
mov edx, eax
push ecx
push 0
mov ecx, edi
call fcn.004aee00
add esp, 8
cmp eax, 1
jne 0x4cb6a8
lea edx, [ebp - 0x9b0]
mov ecx, edi
call fcn.004b6bb0
mov edx, dword [ebp - 0x9b0]
test edx, edx
je 0x4cbbac
mov esi, dword [edx]
mov ecx, dword [ebp - 0x99c]
mov dword [ebp - 0x9b4], esi
call fcn.004aef90
test esi, esi
je 0x4cbbac
mov eax, dword [ebp - 0x994]
push eax
call dword [0x74b960]
add esp, 4
mov dword [ebp - 0x9ac], 0xffffffff
mov dword [ebp - 0x9b0], 0
lea eax, [ebp - 0x9ac]
mov edx, esi
push eax
push 0
mov ecx, edi
call fcn.004ae1d0
add esp, 8
mov dword [ebp - 0x9b8], eax
test eax, eax
je 0x4cb72f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x9b0], eax
mov dword [ebp - 0x9b4], esi
test esi, esi
jne 0x4cb6f5
jmp 0x4cb739
test esi, esi
jne 0x4cb75b
mov eax, dword [ebp - 0x9b0]
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
push str.socket_failure:__s
push dword [ebp - 0x99c]
call fcn.004ac430
add esp, 0xc
jmp 0x4cbbd6
push dword [esi + 0x10]
lea eax, [ebp - 0x990]
push dword [esi + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp - 0x9a8], eax
mov eax, dword [ebp - 0x9a0]
cmp ax, word [ebp - 0x9a4]
movzx esi, ax
mov eax, dword [ebp - 0x9ac]
mov dword [ebp - 0x994], eax
ja 0x4cbb8a
nop dword [eax + eax]
cmp word [ebp - 0x990], 2
jne 0x4cb7be
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x98e], ax
mov eax, dword [ebp - 0x994]
push dword [ebp - 0x9a8]
lea ecx, [ebp - 0x990]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4cb8d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x995], 0
je 0x4cb84c
cmp eax, 0x2741
jne 0x4cb84c
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
movzx eax, si
mov esi, dword [ebp - 0x99c]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.004ac3b0
add esp, 0x10
mov dword [ebp - 0x9a8], 0x80
lea eax, [ebp - 0x9a8]
push eax
lea eax, [ebp - 0x990]
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4cb871
mov eax, dword [ebp - 0x9a0]
movzx esi, ax
mov byte [ebp - 0x995], 0
jmp 0x4cb859
cmp eax, 0x2740
je 0x4cb858
cmp eax, 0xd
jne 0x4cb8a1
inc esi
cmp si, word [ebp - 0x9a4]
ja 0x4cbb8a
mov eax, dword [ebp - 0x994]
jmp 0x4cb7a0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
push str.getsockname___failed:__s
push esi
call fcn.004ac430
mov edx, dword [ebp - 0x994]
add esp, 0xc
mov ecx, edi
call fcn.004ae180
jmp 0x4cbbd6
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x99c]
call fcn.004ac430
mov edx, dword [ebp - 0x994]
add esp, 0x10
mov ecx, edi
call fcn.004ae180
jmp 0x4cbbd6
cmp si, word [ebp - 0x9a4]
ja 0x4cbb8a
mov esi, dword [ebp - 0x994]
lea eax, [ebp - 0x9a8]
push eax
lea eax, [ebp - 0x990]
mov dword [ebp - 0x9a8], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4cb93b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x99c]
call fcn.004ac430
add esp, 0xc
mov edx, esi
mov ecx, edi
call fcn.004ae180
jmp 0x4cbbd6
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4cb979
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004c21a0
push eax
push str.socket_failure:__s
push dword [ebp - 0x99c]
call fcn.004ac430
add esp, 0xc
mov edx, esi
mov ecx, edi
call fcn.004ae180
jmp 0x4cbbd6
mov ecx, dword [ebp - 0x9b4]
lea edx, [ebp - 0x108]
push 0x100
call fcn.004aeaa0
add esp, 4
cmp ebx, 2
je 0x4cb9ef
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x990]
cmp byte [edi + 0x1f1], 0
jne 0x4cb9b1
test ebx, ebx
je 0x4cb9e9
cmp ebx, 1
jne 0x4cb9bc
cmp cx, 2
jne 0x4cb9e9
movzx eax, cx
sub eax, 2
jne 0x4cb9e9
push dword [ebp - 0x98e]
call esi
movzx eax, ax
mov dword [ebp - 0x9b4], eax
test ebx, ebx
je 0x4cbaff
cmp ebx, 1
je 0x4cba3f
mov cx, word [ebp - 0x990]
inc ebx
cmp ebx, 2
jne 0x4cb9a4
mov esi, dword [ebp - 0x9b8]
mov dword [edi + 0x41c], ebx
mov edx, dword [edi + 0x158]
cmp edx, 0xffffffff
je 0x4cba0d
mov ecx, edi
call fcn.004ae180
mov edx, dword [ebp - 0x994]
mov ecx, edi
mov dword [edi + 0x158], edx
mov edx, 0x1c
mov byte [edi + 0x1ea], 1
call fcn.004cb1c0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a1e
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x910]
mov edi, 0x2c
lea esi, [ebp - 0x108]
mov cl, byte [esi]
test cl, cl
je 0x4cba67
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
add esi, 1
jne 0x4cba50
mov eax, dword [ebp - 0x9b4]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.004c1720
mov edi, dword [ebp - 0x9bc]
lea eax, [ebp - 0x910]
add esp, 0x14
push eax
push str.PORT
lea eax, [edi + 0x3c0]
push 0x6f3d74
push eax
call fcn.004dd930
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4cb9f5
mov ecx, esi
call fcn.004c1a00
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x99c]
call fcn.004ac430
mov edx, dword [ebp - 0x994]
add esp, 0xc
mov ecx, edi
call fcn.004ae180
xor edx, edx
mov ecx, edi
call fcn.004cb1c0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a1e
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x108]
push eax
xor eax, eax
cmp word [ebp - 0x990], 2
setne al
inc eax
push eax
push str.EPRT
lea eax, [edi + 0x3c0]
push str._s__d_s_hu
push eax
call fcn.004dd930
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4cb9f5
mov ecx, esi
call fcn.004c1a00
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x99c]
call fcn.004ac430
mov edx, dword [ebp - 0x994]
add esp, 0xc
mov ecx, edi
call fcn.004ae180
xor edx, edx
mov dword [edi + 0x41c], 1
mov ecx, edi
call fcn.004cb1c0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a1e
mov esp, ebp
pop ebp
ret
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x99c]
call fcn.004ac430
mov edx, dword [ebp - 0x994]
add esp, 8
mov ecx, edi
call fcn.004ae180
jmp 0x4cbbd6
mov eax, dword [ebp - 0x9ac]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x99c]
call fcn.004ac430
mov eax, dword [ebp - 0x994]
add esp, 0xc
push eax
call dword [0x74b960]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00669a1e
mov esp, ebp
pop ebp
ret