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

Disassembly:
sub esp, 0x9ac
mov eax, dword [0x5176f0]
xor eax, esp
mov dword [esp + 0x9a8], eax
mov eax, dword [esp + 0x9b0]
push ebx
push ebp
mov ebp, dword [edi]
push esi
xor ebx, ebx
push 0xff
lea ecx, [esp + 0xb5]
push ebx
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], 0xffffffff
mov byte [esp + 0xbc], bl
call fcn.004b28e0
mov esi, dword [ebp + 0x43c]
mov dword [esp + 0x30], ebx
mov eax, dword [ebp + 0x43c]
add esp, 0xc
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], 1
cmp eax, ebx
je 0x49b068
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49af10
sub eax, edx
cmp eax, 1
jbe 0x49b068
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49af27
sub eax, edx
cmp eax, 0x41
jae 0x49af3c
mov eax, 0x41
jmp 0x49af4a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49af41
sub eax, edx
inc eax
push 1
push eax
call dword [0x517180]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x49af78
pop esi
pop ebp
lea eax, [ebx + 0x1b]
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
mov al, byte [esi]
cmp al, 0x5b
jne 0x49b0d3
lea edx, [esi + 1]
push 0x5d
push esi
mov dword [esp + 0x28], edx
call fcn.004b0a10
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x49b01c
mov eax, dword [esp + 0x20]
mov ecx, ebp
sub ecx, eax
push ecx
push eax
push ebx
call fcn.004b6550
add esp, 0xc
test ebp, ebp
je 0x49b01c
push 0x3a
push ebp
call fcn.004b0a10
mov esi, eax
add esp, 8
test esi, esi
je 0x49b01c
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.004b03bc
push eax
call fcn.004a2550
movzx ebp, ax
push 0x2d
push esi
mov dword [esp + 0x34], ebp
call fcn.004b0a10
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x49b143
push 0xa
inc eax
push esi
push eax
call fcn.004b03bc
push eax
call fcn.004a2550
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x49b01c
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
cmp byte [ebx], 0
je 0x49b068
mov ecx, dword [edi + 0x88]
mov edx, dword [edi + 0x4c]
push 0x401
lea eax, [esp + 0x1b4]
push eax
mov eax, dword [edx + 0x18]
push ebx
push ecx
push eax
call fcn.004a6680
mov ecx, dword [edi + 0x4c]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.0042e8b0
add esp, 0x18
sub eax, 0
je 0x49b14f
dec eax
je 0x49b0b6
dec eax
je 0x49b191
mov edx, dword [edi + 0x190]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x49b153
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0048f860
push eax
mov eax, dword [esp + 0x1c]
push str.getsockname___failed:__s
push eax
call fcn.0048af30
push ebx
call dword [0x517174]
add esp, 0x18
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
cmp al, 0x3a
jne 0x49b0de
mov ebp, esi
jmp 0x49afb1
push 0x3a
push esi
call fcn.004b0a10
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x49b12e
lea edx, [esp + 0x30]
push edx
push esi
push 0x17
call fcn.0048fc00
add esp, 0xc
cmp eax, 1
jne 0x49b123
xor eax, eax
mov edx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x49b114
jmp 0x49b01c
mov eax, ebp
sub eax, esi
push eax
push esi
jmp 0x49afa8
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x49b134
jmp 0x49b01c
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x49b01c
mov esi, ebx
jmp 0x49b198
movzx eax, word [esp + 0x30]
push 0x401
cmp eax, 0x17
je 0x49b172
lea ecx, [esp + 0x1b4]
push ecx
lea edx, [esp + 0x3c]
push edx
push eax
jmp 0x49b181
lea eax, [esp + 0x1b4]
push eax
lea ecx, [esp + 0x40]
push ecx
push 0x17
call fcn.004901b0
add esp, 0x10
mov dword [esp + 0x28], 0
lea esi, [esp + 0x1b0]
lea edx, [esp + 0x24]
push edx
push 0
push esi
push edi
call fcn.0048a2d0
add esp, 0x10
cmp eax, 1
jne 0x49b1bc
lea eax, [esp + 0x24]
push eax
push edi
call fcn.00489cd0
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x49b1d8
mov ecx, dword [esp + 0x10]
mov ebp, dword [eax]
push eax
push ecx
call fcn.0048a450
add esp, 8
test ebp, ebp
jne 0x49b20f
mov edx, dword [esp + 0x10]
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edx
call fcn.0048af30
push ebx
call dword [0x517174]
add esp, 0x10
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
push ebx
call dword [0x517174]
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 4
mov dword [esp + 0xc], 0xffffffff
xor esi, esi
lea esp, [esp]
lea eax, [esp + 0xc]
push eax
push 0
push ebp
push edi
call fcn.0048c9d0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x49b256
call ebx
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x49b230
jmp 0x49b25a
test ebp, ebp
jne 0x49b291
push esi
push edi
call fcn.0048f860
mov ecx, dword [esp + 0x18]
push eax
push str.socket_failure:__s
push ecx
call fcn.0048af30
add esp, 0x14
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.004b4b70
mov eax, dword [esp + 0x28]
mov edx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x14], edx
movzx esi, ax
cmp ax, word [esp + 0x18]
ja 0x49b3f5
mov ebx, dword [esp + 0x28]
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0xc]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x49b3ee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
je 0x49b347
cmp eax, 0x2741
jne 0x49b347
push eax
push edi
call fcn.0048f860
push eax
movzx eax, si
mov esi, dword [esp + 0x1c]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.0048ae90
mov eax, dword [edi + 0x190]
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x49b364
movzx esi, word [esp + 0x1c]
xor ebx, ebx
jmp 0x49b354
cmp eax, 0x2740
je 0x49b353
cmp eax, 0xd
jne 0x49b3a8
inc esi
cmp si, word [esp + 0x18]
jbe 0x49b2c3
jmp 0x49b3f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0048f860
push eax
push str.getsockname___failed:__s
push esi
call fcn.0048af30
mov ecx, dword [esp + 0x20]
push ecx
push edi
call fcn.0048c970
add esp, 0x1c
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
push eax
push edi
call fcn.0048f860
push eax
mov eax, dword [esp + 0x1c]
movzx edx, si
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.0048af30
mov ecx, dword [esp + 0x24]
push ecx
push edi
call fcn.0048c970
add esp, 0x20
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
cmp si, word [esp + 0x18]
jbe 0x49b42f
mov edx, dword [esp + 0x10]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.0048af30
mov eax, dword [esp + 0x14]
push eax
push edi
call fcn.0048c970
add esp, 0x10
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x49b498
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0048f860
push eax
push str.getsockname___failed:__s
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0048af30
mov edx, dword [esp + 0x20]
push edx
push edi
call fcn.0048c970
add esp, 0x1c
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
mov eax, dword [esp + 0xc]
push 1
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x49b4be
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0048f860
push eax
push str.socket_failure:__s
jmp 0x49b463
push 0x100
lea eax, [esp + 0xb4]
push eax
push ebp
call fcn.0048a0a0
add esp, 0xc
cmp dword [edi + 0x2ac], 0
jne 0x49b4f0
cmp dword [edi + 0x284], 0
je 0x49b4f0
mov dword [edi + 0x2ac], 1
mov ebp, dword [esp + 0x2c]
cmp ebp, 2
je 0x49b552
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
cmp dword [edi + 0x2ac], 0
jne 0x49b511
test ebp, ebp
je 0x49b54c
cmp ebp, 1
jne 0x49b51c
cmp cx, 2
jne 0x49b54c
movzx eax, cx
sub eax, 2
je 0x49b530
sub eax, 0x15
jne 0x49b54c
mov ecx, dword [esp + 0x32]
push ecx
jmp 0x49b535
mov edx, dword [esp + 0x32]
push edx
call ebx
movzx esi, ax
test ebp, ebp
je 0x49b5bd
cmp ebp, 1
je 0x49b633
mov cx, word [esp + 0x30]
inc ebp
cmp ebp, 2
jne 0x49b504
mov ebx, dword [esp + 0x20]
mov dword [edi + 0x520], ebp
mov eax, dword [edi + 0x194]
cmp eax, 0xffffffff
je 0x49b57b
push eax
push edi
call fcn.0048c970
add esp, 8
mov dword [edi + 0x194], 0xffffffff
mov eax, dword [esp + 0xc]
mov dword [edi + 0x570], 0
mov dword [edi + 0x194], eax
mov dword [edi + 0x290], 1
mov dword [edi + 0x52c], 0x1c
mov ecx, dword [esp + 0x9b4]
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.004ae123
add esp, 0x9ac
ret
xor edx, edx
cmp word [esp + 0x30], 2
movzx eax, si
setne dl
push eax
lea ecx, [esp + 0xb4]
push ecx
lea esi, [edi + 0x4b8]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push esi
call fcn.004a6be0
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x49b556
push ebx
call fcn.0048eec0
push eax
mov eax, dword [esp + 0x18]
push str.Failure_sending_EPRT_command:__s
push eax
call fcn.0048af30
mov ecx, dword [esp + 0x1c]
push ecx
push edi
call fcn.0048c970
mov dword [esi + 0x68], 1
add esp, 0x18
mov dword [edi + 0x52c], 0
jmp 0x49b5a3
lea ecx, [esp + 0x5b4]
lea edx, [esp + 0xb0]
mov al, byte [edx]
test al, al
je 0x49b656
cmp al, 0x2e
jne 0x49b650
mov byte [ecx], 0x2c
jmp 0x49b652
mov byte [ecx], al
inc ecx
inc edx
jne 0x49b641
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.0048e260
lea eax, [esp + 0x5c8]
push eax
push str.PORT
lea eax, [edi + 0x4b8]
push 0x4e6dfc
push eax
call fcn.004a6be0
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x49b556
push ebx
call fcn.0048eec0
mov ecx, dword [esp + 0x14]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.0048af30
mov edx, dword [esp + 0x1c]
push edx
push edi
call fcn.0048c970
add esp, 0x18
mov dword [edi + 0x52c], 0
jmp 0x49b5a3