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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x62c
mov eax, dword [0x9d8c80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
push 0x2e
push 0
mov dword [ebp - 0x62c], edi
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x608], eax
add eax, 0x438
mov dword [ebp - 0x624], eax
lea eax, [ebp - 0x33]
push eax
mov dword [ebp - 0x604], 0xffffffff
mov byte [ebp - 0x34], 0
call fcn.00646d30
mov esi, dword [edi + 0x55c]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x628], 0
mov dword [ebp - 0x618], 0
mov dword [ebp - 0x620], 0
mov byte [ebp - 0x5fd], 1
mov dword [ebp - 0x60c], eax
test esi, esi
je 0x771374
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x7711d4
sub ecx, edx
cmp ecx, 1
jbe 0x771374
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x7711f0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x7711f0
sub ecx, edx
cmp ecx, 0x16
jae 0x771205
mov ecx, 0x16
jmp 0x771219
mov ecx, esi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x771210
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x9da1c0]
add esp, 8
mov dword [ebp - 0x60c], eax
test eax, eax
jne 0x771248
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00645ebf
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
je 0x771281
push 0x3a
push esi
call fcn.007862b0
add esp, 8
mov dword [ebp - 0x61c], eax
test eax, eax
je 0x771318
mov ecx, eax
mov eax, dword [ebp - 0x60c]
sub ecx, esi
push ecx
push esi
push eax
call fcn.00648130
mov esi, dword [ebp - 0x61c]
add esp, 0xc
test esi, esi
je 0x77132d
push 0x3a
push esi
call fcn.007862b0
mov esi, eax
add esp, 8
test esi, esi
je 0x77132d
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.006587d5
push eax
call fcn.0074ccf0
movzx eax, ax
push 0x2d
push esi
mov dword [ebp - 0x618], eax
call fcn.007862b0
add esp, 0x18
test eax, eax
je 0x771307
push 0xa
inc eax
push 0
push eax
call fcn.006587d5
push eax
call fcn.0074ccf0
mov ecx, dword [ebp - 0x618]
add esp, 0x10
movzx eax, ax
mov dword [ebp - 0x620], eax
cmp cx, ax
jbe 0x77132d
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x618], 0
jmp 0x77132d
mov ecx, dword [ebp - 0x618]
movzx eax, cx
mov dword [ebp - 0x620], eax
jmp 0x77132d
mov ecx, dword [ebp - 0x60c]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x771320
mov esi, dword [ebp - 0x60c]
cmp byte [esi], 0
je 0x771376
push 0x401
lea eax, [ebp - 0x57c]
push eax
mov eax, dword [ebp - 0x608]
push esi
mov eax, dword [eax + 0x48]
push dword [eax + 4]
call fcn.006b0170
add esp, 0x10
sub eax, 0
je 0x77136d
dec eax
je 0x77196f
dec eax
jne 0x771376
jmp 0x771409
mov eax, esi
jmp 0x77140f
xor esi, esi
lea eax, [ebp - 0x610]
mov dword [ebp - 0x610], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
mov eax, dword [ebp - 0x608]
push dword [eax + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x7713d7
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0075ce90
push eax
push str.getsockname___failed:__s
push edi
call fcn.0074a7f0
push esi
call dword [0x9da1b4]
add esp, 0x1c
jmp 0x77196f
push 0x401
lea eax, [ebp - 0x57c]
push eax
lea eax, [ebp - 0x5f8]
push eax
movzx eax, word [ebp - 0x5fc]
push eax
call fcn.00777280
add esp, 0x10
test eax, eax
je 0x77196f
mov byte [ebp - 0x5fd], 0
lea eax, [ebp - 0x57c]
lea ecx, [ebp - 0x628]
mov dword [ebp - 0x614], eax
push ecx
push 0
push 0
push eax
push edi
call fcn.00752e30
add esp, 0x14
cmp eax, 1
jne 0x77143f
lea eax, [ebp - 0x628]
push eax
push edi
call fcn.00741820
add esp, 8
mov eax, dword [ebp - 0x628]
test eax, eax
je 0x77194e
mov esi, dword [eax]
push eax
push edi
mov dword [ebp - 0x61c], esi
call fcn.007530e0
add esp, 8
test esi, esi
je 0x77194e
mov eax, dword [ebp - 0x60c]
push eax
call dword [0x9da1b4]
add esp, 4
mov dword [ebp - 0x604], 0xffffffff
mov dword [ebp - 0x614], 0
jmp 0x771490
lea eax, [ebp - 0x604]
push eax
push 0
push esi
push edi
call fcn.0074bd20
add esp, 0x10
mov dword [ebp - 0x60c], eax
test eax, eax
je 0x7714c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x614], eax
mov dword [ebp - 0x61c], esi
test esi, esi
jne 0x771490
jmp 0x7714d2
test esi, esi
jne 0x7714f8
mov eax, dword [ebp - 0x614]
push 0x100
lea ecx, [ebp - 0x178]
push ecx
push eax
call fcn.0075ce90
push eax
push str.socket_failure:__s
push edi
call fcn.0074a7f0
add esp, 0x18
jmp 0x77196f
push dword [esi + 0x10]
lea eax, [ebp - 0x5fc]
push dword [esi + 0x18]
push eax
call fcn.00646450
mov eax, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp - 0x610], eax
mov eax, dword [ebp - 0x618]
movzx esi, ax
cmp ax, word [ebp - 0x620]
ja 0x771602
lea esp, [esp]
cmp word [ebp - 0x5fc], 2
jne 0x771548
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x5fa], ax
push dword [ebp - 0x610]
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x604]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x77169c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x5fd], 0
je 0x7715e8
cmp eax, 0x2741
jne 0x7715e8
push 0x100
lea eax, [ebp - 0x178]
push eax
push 0x2741
call fcn.0075ce90
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.0074a8b0
mov esi, dword [ebp - 0x608]
lea eax, [ebp - 0x610]
add esp, 0x1c
mov dword [ebp - 0x610], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [esi + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x771627
mov eax, dword [ebp - 0x618]
movzx esi, ax
mov byte [ebp - 0x5fd], 0
jmp 0x7715f5
cmp eax, 0x2740
je 0x7715f4
cmp eax, 0xd
jne 0x771660
inc esi
cmp si, word [ebp - 0x620]
jbe 0x771530
push str.bind___failed__we_ran_out_of_ports_
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push dword [ebp - 0x608]
push edi
call fcn.0074b0f0
add esp, 0x14
jmp 0x77196f
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0075ce90
push eax
push str.getsockname___failed:__s
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push esi
push edi
call fcn.0074b0f0
add esp, 0x24
jmp 0x77196f
push 0x100
lea ecx, [ebp - 0x178]
push ecx
push eax
call fcn.0075ce90
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push dword [ebp - 0x608]
push edi
call fcn.0074b0f0
add esp, 0x28
jmp 0x77196f
cmp si, word [ebp - 0x620]
ja 0x771602
lea eax, [ebp - 0x610]
mov dword [ebp - 0x610], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x604]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x77170f
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0075ce90
push eax
push str.getsockname___failed:__s
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push dword [ebp - 0x608]
push edi
call fcn.0074b0f0
add esp, 0x24
jmp 0x77196f
push 1
push dword [ebp - 0x604]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x771741
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0075ce90
push eax
push str.socket_failure:__s
jmp 0x7716ef
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x61c]
call fcn.00752e00
add esp, 0xc
cmp ebx, 2
je 0x7717c1
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x5fc]
mov eax, dword [ebp - 0x608]
lea ecx, [ecx]
cmp byte [eax + 0x26b], 0
jne 0x77177d
test ebx, ebx
je 0x7717bb
cmp ebx, 1
jne 0x771788
cmp cx, 2
jne 0x7717bb
movzx eax, cx
sub eax, 2
jne 0x7717b5
push dword [ebp - 0x5fa]
call esi
movzx eax, ax
mov dword [ebp - 0x61c], eax
test ebx, ebx
je 0x7718c5
cmp ebx, 1
je 0x77180e
mov cx, word [ebp - 0x5fc]
mov eax, dword [ebp - 0x608]
inc ebx
cmp ebx, 2
jne 0x771770
mov esi, dword [ebp - 0x60c]
mov eax, dword [ebp - 0x624]
mov dword [eax + 0x78], ebx
mov ebx, dword [ebp - 0x608]
push ebx
push edi
call fcn.0076edd0
mov eax, dword [ebp - 0x604]
push 0x1c
push edi
mov dword [ebx + 0x14c], eax
mov byte [ebx + 0x255], 1
call fcn.0076edb0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00645ebf
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x78]
mov edi, 0x2c
lea esi, [ebp - 0x34]
lea esp, [esp]
mov cl, byte [esi]
test cl, cl
je 0x771835
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x771820
mov eax, dword [ebp - 0x61c]
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.0075b3c0
mov edi, dword [ebp - 0x62c]
lea eax, [ebp - 0x78]
push eax
push str.PORT
push 0x82ca2c
push dword [ebp - 0x624]
push edi
call fcn.0077f2b0
mov esi, eax
add esp, 0x28
test esi, esi
je 0x7717c7
push esi
call fcn.0075d010
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push dword [ebp - 0x608]
push edi
call fcn.0074b0f0
push 0
push edi
call fcn.0076edb0
add esp, 0x24
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00645ebf
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x34]
push eax
xor eax, eax
cmp word [ebp - 0x5fc], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x624]
push edi
call fcn.0077f2b0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x7717c7
push esi
call fcn.0075d010
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.0074a7f0
push dword [ebp - 0x604]
push dword [ebp - 0x608]
push edi
call fcn.0074b0f0
mov eax, dword [ebp - 0x624]
push 0
push edi
mov dword [eax + 0x78], 1
call fcn.0076edb0
add esp, 0x24
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00645ebf
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x614]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.0074a7f0
mov eax, dword [ebp - 0x60c]
push eax
call dword [0x9da1b4]
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00645ebf
mov esp, ebp
pop ebp
ret