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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa44
mov eax, dword [0x5bc324]
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 - 0xa44], edi
mov dword [ebp - 0xa2c], esi
call sub.VCRUNTIME140.dll_memset
mov esi, dword [esi + 0x3ec]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0xa24], 0
mov dword [ebp - 0xa30], 0
mov dword [ebp - 0xa34], 0
mov dword [ebp - 0xa40], 1
mov dword [ebp - 0xa28], eax
test esi, esi
je 0x4b723f
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b70b1
sub ecx, edx
cmp ecx, 1
jbe 0x4b723f
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b70c8
sub ecx, edx
cmp ecx, 0x16
jae 0x4b70dd
mov ecx, 0x16
jmp 0x4b70eb
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b70e2
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x5bcc84]
add esp, 8
mov dword [ebp - 0xa28], eax
test eax, eax
jne 0x4b711a
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
mov eax, dword [sym.imp.VCRUNTIME140.dll_strchr]
je 0x4b715b
push 0x3a
push esi
call eax
add esp, 8
mov dword [ebp - 0xa3c], eax
test eax, eax
je 0x4b71c2
mov ecx, eax
mov eax, dword [ebp - 0xa28]
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 - 0xa3c]
add esp, 0xc
mov eax, dword [sym.imp.VCRUNTIME140.dll_strchr]
test esi, esi
je 0x4b71dd
push 0x3a
push esi
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x4b71dd
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
movzx eax, ax
mov dword [ebp - 0xa30], eax
push 0x2d
push esi
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x4b71b1
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
movzx ecx, ax
add esp, 0xc
mov dword [ebp - 0xa34], ecx
jmp 0x4b71dd
mov eax, dword [ebp - 0xa30]
movzx ecx, ax
mov dword [ebp - 0xa34], ecx
jmp 0x4b71dd
mov ecx, dword [ebp - 0xa28]
sub ecx, esi
nop word [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x4b71d0
mov esi, dword [ebp - 0xa34]
xor ecx, ecx
cmp word [ebp - 0xa30], si
movzx eax, si
cmovbe ecx, eax
mov eax, dword [ebp - 0xa30]
movzx edx, cx
xor ecx, ecx
cmp word [ebp - 0xa30], si
mov esi, dword [ebp - 0xa28]
movzx eax, ax
cmovbe ecx, eax
movzx ecx, cx
cmp byte [esi], 0
je 0x4b722d
mov dword [ebp - 0xa30], ecx
mov eax, esi
mov ecx, edx
mov dword [ebp - 0xa34], ecx
jmp 0x4b72c9
mov eax, ecx
mov dword [ebp - 0xa30], eax
mov eax, edx
mov dword [ebp - 0xa34], eax
jmp 0x4b7241
xor esi, esi
lea eax, [ebp - 0xa38]
mov dword [ebp - 0xa38], 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 0x4b729a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
add esp, 0xc
test esi, esi
je 0x4b7869
push esi
jmp 0x4b7860
movzx ecx, word [ebp - 0x990]
lea eax, [ebp - 0x910]
push 0x401
push eax
lea edx, [ebp - 0x98c]
call fcn.004aa740
add esp, 8
lea eax, [ebp - 0x910]
xor ecx, ecx
mov dword [ebp - 0xa40], ecx
lea ecx, [ebp - 0xa24]
mov dword [ebp - 0xa3c], eax
push ecx
push 0
mov edx, eax
mov ecx, edi
call fcn.00493ab0
add esp, 8
cmp eax, 1
jne 0x4b72f6
lea edx, [ebp - 0xa24]
mov ecx, edi
call fcn.0049da10
mov edx, dword [ebp - 0xa24]
test edx, edx
je 0x4b783c
mov ecx, dword [ebp - 0xa2c]
mov esi, dword [edx]
call fcn.00493d40
test esi, esi
je 0x4b783c
mov eax, dword [ebp - 0xa28]
test eax, eax
je 0x4b7330
push eax
call dword [0x5bcc7c]
add esp, 4
nop dword [eax]
mov eax, dword [esi + 4]
mov dword [ebp - 0xa20], eax
mov eax, dword [edi + 0x8c]
cmp eax, 2
mov dword [ebp - 0xa1c], eax
mov eax, 0x11
je 0x4b7352
mov eax, dword [esi + 0xc]
mov dword [ebp - 0xa18], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0xa14], eax
cmp eax, 0x80
jbe 0x4b7377
mov dword [ebp - 0xa14], 0x80
mov eax, 0x80
push eax
push dword [esi + 0x18]
lea eax, [ebp - 0xa10]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [edi]
add esp, 0xc
mov eax, dword [ecx + 0x1f8]
test eax, eax
je 0x4b73ac
lea edx, [ebp - 0xa20]
push edx
push 0
push dword [ecx + 0x1fc]
call eax
add esp, 0xc
jmp 0x4b73c4
push dword [ebp - 0xa18]
push dword [ebp - 0xa1c]
push dword [ebp - 0xa20]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xa24], eax
cmp eax, 0xffffffff
jne 0x4b7402
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4b7330
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
push str.socket_failure:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
add esp, 0xc
jmp 0x4b7869
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 ecx, dword [ebp - 0xa30]
mov dword [ebp - 0xa38], eax
movzx eax, cx
mov dword [ebp - 0xa28], eax
cmp cx, word [ebp - 0xa34]
ja 0x4b7517
nop dword [eax]
cmp word [ebp - 0x990], 2
jne 0x4b7458
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x98e], ax
push dword [ebp - 0xa38]
lea eax, [ebp - 0x990]
push eax
push dword [ebp - 0xa24]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4b75aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0xa40], 0
je 0x4b74f1
cmp eax, 0x2741
jne 0x4b74f1
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
mov eax, dword [ebp - 0xa28]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0xa2c]
call fcn.00490900
add esp, 0x10
mov dword [ebp - 0xa38], 0x80
lea eax, [ebp - 0xa38]
push eax
lea eax, [ebp - 0x990]
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b753c
mov eax, dword [ebp - 0xa30]
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0xa40], ecx
jmp 0x4b7504
cmp eax, 0x2740
je 0x4b74fd
cmp eax, 0xd
jne 0x4b7571
mov eax, dword [ebp - 0xa28]
inc eax
mov dword [ebp - 0xa28], eax
cmp ax, word [ebp - 0xa34]
jbe 0x4b7440
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0xa2c]
call fcn.004909c0
mov edx, dword [ebp - 0xa24]
add esp, 8
mov ecx, edi
call fcn.00492cd0
jmp 0x4b7869
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
mov edx, dword [ebp - 0xa24]
add esp, 0xc
mov ecx, edi
call fcn.00492cd0
jmp 0x4b7869
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
mov eax, dword [ebp - 0xa28]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
mov edx, dword [ebp - 0xa24]
add esp, 0x10
mov ecx, edi
call fcn.00492cd0
jmp 0x4b7869
mov eax, dword [ebp - 0xa28]
cmp ax, word [ebp - 0xa34]
ja 0x4b7517
lea eax, [ebp - 0xa38]
mov dword [ebp - 0xa38], 0x80
push eax
lea eax, [ebp - 0x990]
push eax
push dword [ebp - 0xa24]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b753c
push 1
push dword [ebp - 0xa24]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4b7615
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.0048cc00
push eax
push str.socket_failure:__s
jmp 0x4b7551
mov eax, dword [esi + 4]
sub eax, 2
jne 0x4b763c
mov edx, dword [esi + 0x18]
lea eax, [ebp - 0x108]
push 0x100
push eax
add edx, 4
mov ecx, 2
call fcn.004aa740
add esp, 8
cmp ebx, 2
je 0x4b769b
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x990]
nop
cmp dword [edi + 0x290], 0
jne 0x4b765d
test ebx, ebx
je 0x4b7695
cmp ebx, 1
jne 0x4b7668
cmp cx, 2
jne 0x4b7695
movzx eax, cx
sub eax, 2
jne 0x4b7695
push dword [ebp - 0x98e]
call esi
movzx eax, ax
mov dword [ebp - 0xa3c], eax
test ebx, ebx
je 0x4b77b0
cmp ebx, 1
je 0x4b76e8
mov cx, word [ebp - 0x990]
inc ebx
cmp ebx, 2
jne 0x4b7650
xor esi, esi
mov dword [edi + 0x538], ebx
mov edx, dword [edi + 0x158]
cmp edx, 0xffffffff
je 0x4b76b5
mov ecx, edi
call fcn.00492cd0
mov eax, dword [ebp - 0xa24]
mov dword [edi + 0x158], eax
mov eax, esi
mov dword [edi + 0x274], 1
mov dword [edi + 0x544], 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x508]
mov edi, 0x2c
lea esi, [ebp - 0x108]
nop dword [eax]
mov cl, byte [esi]
test cl, cl
je 0x4b7717
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
add esi, 1
jne 0x4b7700
mov eax, dword [ebp - 0xa3c]
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.004a0a20
mov edi, dword [ebp - 0xa44]
lea eax, [ebp - 0x508]
add esp, 0x14
push eax
push str.PORT
lea eax, [edi + 0x4d0]
push 0x598550
push eax
call fcn.004cba20
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4b769d
mov ecx, esi
call fcn.0048c490
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
mov edx, dword [ebp - 0xa24]
add esp, 0xc
mov ecx, edi
call fcn.00492cd0
mov dword [edi + 0x544], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
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 + 0x4d0]
push str._s__d_s_hu
push eax
call fcn.004cba20
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4b769d
mov ecx, esi
call fcn.0048c490
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
mov edx, dword [ebp - 0xa24]
add esp, 0xc
mov ecx, edi
call fcn.00492cd0
mov dword [edi + 0x538], 1
mov eax, esi
mov dword [edi + 0x544], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xa3c]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0xa2c]
call fcn.004909c0
mov eax, dword [ebp - 0xa28]
add esp, 0xc
test eax, eax
je 0x4b7869
push eax
call dword [0x5bcc7c]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00523a6a
mov esp, ebp
pop ebp
ret