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

Disassembly:
sub esp, 0x618
push ebx
mov ebx, dword [esp + 0x620]
push ebp
push esi
push edi
mov edi, dword [ebx]
push 0x2e
xor ebp, ebp
lea eax, [esp + 0xb5]
push ebp
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0xbc], 0
call fcn.004d8c50
mov esi, dword [edi + 0x9f4]
mov dword [esp + 0x30], ebp
mov eax, dword [edi + 0x9f4]
add esp, 0xc
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], 1
cmp eax, ebp
je 0x4b5e41
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b5c57
sub eax, edx
cmp eax, 1
jbe 0x4b5e41
mov eax, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b5c70
sub eax, edx
cmp eax, 0x41
jae 0x4b5c85
mov eax, 0x41
jmp 0x4b5c99
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b5c90
sub eax, edx
inc eax
push 1
push eax
call dword [0x54ae78]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4b5cba
pop edi
pop esi
lea eax, [ebp + 0x1b]
pop ebp
pop ebx
add esp, 0x618
ret
mov al, byte [esi]
cmp al, 0x5b
jne 0x4b5d6f
push 0x5d
push esi
lea ebx, [esi + 1]
call fcn.004d5b60
mov edi, eax
add esp, 8
test edi, edi
je 0x4b5deb
mov ecx, edi
sub ecx, ebx
push ecx
push ebx
push ebp
call fcn.004dcf70
mov ebx, dword [esp + 0x638]
add esp, 0xc
test edi, edi
je 0x4b5df2
push 0x3a
push edi
call fcn.004d5b60
mov esi, eax
add esp, 8
test esi, esi
je 0x4b5df2
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.004dc061
push eax
call fcn.0049c8e0
movzx edi, ax
push 0x2d
push esi
mov dword [esp + 0x38], edi
call fcn.004d5b60
add esp, 0x18
test eax, eax
je 0x4b5de2
push 0xa
inc eax
push 0
push eax
call fcn.004dc061
push eax
call fcn.0049c8e0
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp di, ax
jbe 0x4b5df2
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
jmp 0x4b5df2
cmp al, 0x3a
jne 0x4b5d7a
mov edi, esi
jmp 0x4b5cf2
push 0x3a
push esi
call fcn.004d5b60
mov edi, eax
add esp, 8
test edi, edi
je 0x4b5dd0
lea edx, [esp + 0x30]
push edx
push esi
push 0x17
call fcn.004c80d0
add esp, 0xc
cmp eax, 1
jne 0x4b5dbc
xor eax, eax
mov edx, ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4b5db0
jmp 0x4b5df2
mov eax, edi
sub eax, esi
push eax
push esi
push ebp
call fcn.004dcf70
add esp, 0xc
jmp 0x4b5cf2
mov edx, ebp
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4b5dd6
jmp 0x4b5df2
movzx edx, di
mov dword [esp + 0x18], edx
jmp 0x4b5df2
mov ebx, dword [esp + 0x62c]
cmp byte [ebp], 0
je 0x4b5e41
mov ecx, dword [ebx + 0x2f4]
mov edx, dword [ebx + 0x2b8]
push 0x401
lea eax, [esp + 0x228]
push eax
mov eax, dword [edx + 0x18]
push ebp
push ecx
push eax
call fcn.004c8fe0
mov ecx, dword [ebx + 0x2b8]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.00491520
add esp, 0x18
sub eax, 0
je 0x4b5ea7
dec eax
je 0x4b5e97
dec eax
je 0x4b5ee5
mov edx, dword [ebx + 0x420]
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 0x4b5eab
push 0x100
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0048ee30
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.00499790
push ebp
call dword [0x54ae6c]
add esp, 0x1c
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
mov esi, ebp
jmp 0x4b5eec
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x228]
push edx
cmp eax, 0x17
je 0x4b5eca
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x4b5ed1
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.004c93b0
add esp, 0x10
test eax, eax
je 0x4b5e97
mov dword [esp + 0x28], 0
lea esi, [esp + 0x224]
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push esi
push ebx
call fcn.004c2040
add esp, 0x14
cmp eax, 1
jne 0x4b5f12
lea edx, [esp + 0x24]
push edx
push ebx
call fcn.0048fad0
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4b5f2e
mov edi, dword [eax]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.004c22f0
add esp, 8
test edi, edi
jne 0x4b5f58
mov ecx, dword [esp + 0x14]
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.00499790
push ebp
call dword [0x54ae6c]
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
push ebp
call dword [0x54ae6c]
mov ebp, 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 edi
push ebx
call fcn.004a0a00
add esp, 0x10
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4b5f98
call ebp
mov edi, dword [edi + 0x1c]
mov esi, eax
test edi, edi
jne 0x4b5f72
jmp 0x4b5f9c
test edi, edi
jne 0x4b5fd2
push 0x100
lea eax, [esp + 0x128]
push eax
push esi
call fcn.0048ee30
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.00499790
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.004d8d80
mov eax, dword [esp + 0x2c]
mov edx, dword [edi + 0x10]
add esp, 0xc
mov dword [esp + 0x1c], edx
movzx esi, ax
cmp ax, word [esp + 0x18]
ja 0x4b6144
mov ebp, dword [esp + 0x28]
push esi
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 0x4b613d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebp, ebp
je 0x4b6098
cmp eax, 0x2741
jne 0x4b6098
push 0x100
lea eax, [esp + 0x128]
push eax
push 0x2741
call fcn.0048ee30
movzx ecx, si
mov esi, dword [esp + 0x20]
push eax
push ecx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.004996c0
mov ecx, dword [ebx + 0x420]
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 0x4b60b5
movzx esi, word [esp + 0x20]
xor ebp, ebp
jmp 0x4b60a5
cmp eax, 0x2740
je 0x4b60a4
cmp eax, 0xd
jne 0x4b60f8
inc esi
cmp si, word [esp + 0x18]
jbe 0x4b6004
jmp 0x4b6144
push 0x100
lea edx, [esp + 0x128]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0048ee30
push eax
push str.getsockname___failed:__s
push esi
call fcn.00499790
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.004a0970
add esp, 0x20
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
push 0x100
lea ecx, [esp + 0x128]
push ecx
push eax
call fcn.0048ee30
push eax
mov eax, dword [esp + 0x24]
movzx edx, si
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.00499790
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
call fcn.004a0970
add esp, 0x24
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
cmp si, word [esp + 0x18]
jbe 0x4b6171
mov edx, dword [esp + 0x14]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.00499790
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.004a0970
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x618
ret
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 0x4b61bb
push 0x100
lea ecx, [esp + 0x128]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0048ee30
mov edx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push edx
jmp 0x4b60d5
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4b61ff
push 0x100
lea edx, [esp + 0x128]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0048ee30
push eax
mov eax, dword [esp + 0x24]
push str.socket_failure:__s
push eax
call fcn.00499790
mov ecx, dword [esp + 0x28]
push ecx
jmp 0x4b60df
push 0x2f
lea edx, [esp + 0xb4]
push edx
push edi
call fcn.004c1650
add esp, 0xc
cmp dword [ebx + 0x58c], 0
jne 0x4b622e
cmp dword [ebx + 0x570], 0
je 0x4b622e
mov dword [ebx + 0x58c], 1
mov edi, dword [esp + 0x630]
cmp edi, 2
je 0x4b6293
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
cmp dword [ebx + 0x58c], 0
jne 0x4b6252
test edi, edi
je 0x4b628d
cmp edi, 1
jne 0x4b625d
cmp cx, 2
jne 0x4b628d
movzx eax, cx
sub eax, 2
je 0x4b6271
sub eax, 0x15
jne 0x4b628d
mov eax, dword [esp + 0x32]
push eax
jmp 0x4b6276
mov ecx, dword [esp + 0x32]
push ecx
call ebp
movzx esi, ax
test edi, edi
je 0x4b62f1
cmp edi, 1
je 0x4b6372
mov cx, word [esp + 0x30]
inc edi
cmp edi, 2
jne 0x4b6245
mov ebp, dword [esp + 0x2c]
mov dword [ebx + 0x850], edi
mov eax, dword [ebx + 0x424]
cmp eax, 0xffffffff
je 0x4b62bc
push eax
push ebx
call fcn.004a0970
add esp, 8
mov dword [ebx + 0x424], 0xffffffff
mov eax, dword [esp + 0x10]
pop edi
mov dword [ebx + 0x424], eax
pop esi
mov dword [ebx + 0x538], 0
mov dword [ebx + 0x530], 1
mov eax, ebp
pop ebp
mov dword [ebx + 0x85c], 0x1c
pop ebx
add esp, 0x618
ret
xor ecx, ecx
cmp word [esp + 0x30], 2
movzx edx, si
setne cl
push edx
lea eax, [esp + 0xb4]
push eax
lea esi, [ebx + 0x7c8]
inc ecx
push ecx
push str.EPRT
push str._s__d_s_hu
push esi
call fcn.004cc930
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x4b6297
push ebp
call fcn.0048e3b0
mov edx, dword [esp + 0x18]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.00499790
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.004a0970
add esp, 0x18
pop edi
mov dword [esi + 0x88], 1
pop esi
mov eax, ebp
pop ebp
mov dword [ebx + 0x85c], 0
pop ebx
add esp, 0x618
ret
lea ecx, [esp + 0xe0]
lea edx, [esp + 0xb0]
mov al, byte [edx]
test al, al
je 0x4b6395
cmp al, 0x2e
jne 0x4b638f
mov byte [ecx], 0x2c
jmp 0x4b6391
mov byte [ecx], al
inc ecx
inc edx
jne 0x4b6380
movzx eax, si
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.004a30c0
lea eax, [esp + 0xf4]
push eax
push str.PORT
lea eax, [ebx + 0x7c8]
push 0x51c2d0
push eax
call fcn.004cc930
mov ebp, eax
add esp, 0x24
test ebp, ebp
je 0x4b6297
push ebp
call fcn.0048e3b0
mov ecx, dword [esp + 0x18]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.00499790
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.004a0970
add esp, 0x18
pop edi
pop esi
mov eax, ebp
pop ebp
mov dword [ebx + 0x85c], 0
pop ebx
add esp, 0x618
ret