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

Disassembly:
sub esp, 0x620
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x61c], eax
push ebx
mov ebx, dword [esp + 0x62c]
lea eax, [esp + 0xa9]
push ebp
push esi
push edi
mov edi, dword [esp + 0x634]
push 0x2e
push 0
push eax
mov ebp, dword [edi + 0xc]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x20], 0xffffffff
mov byte [esp + 0xc0], 0
call fcn.00620a70
mov esi, dword [edi + 0x530]
add esp, 0xc
mov dword [esp + 0x30], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov byte [esp + 0x13], 1
test esi, esi
je 0x680af2
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6808f1
sub ecx, edx
cmp ecx, 1
jbe 0x680af2
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x680908
sub ecx, edx
cmp ecx, 0x41
jae 0x68091d
mov ecx, 0x41
jmp 0x68092b
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x680922
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x75ae2c]
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x68094c
mov eax, 0x1b
jmp 0x68108c
mov al, byte [esi]
cmp al, 0x5b
jne 0x680984
lea eax, [esi + 1]
push 0x5d
push esi
mov dword [esp + 0x24], eax
call fcn.00626500
mov esi, eax
add esp, 8
test esi, esi
je 0x680a9d
mov eax, dword [esp + 0x1c]
mov ecx, esi
sub ecx, eax
push ecx
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.006240e0
jmp 0x6809f8
cmp al, 0x3a
je 0x6809fb
push 0x3a
push esi
call fcn.00626500
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x680a84
lea eax, [esp + 0x34]
push eax
push esi
push 0x17
call fcn.0068d8f0
add esp, 0xc
cmp eax, 1
jne 0x6809e2
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], 0
sub ecx, esi
mov dword [esp + 0x24], 0
lea ebx, [ebx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x6809d0
jmp 0x680a9d
mov eax, dword [esp + 0x1c]
sub eax, esi
push eax
mov eax, dword [esp + 0x1c]
push esi
push eax
call fcn.006240e0
mov esi, dword [esp + 0x28]
add esp, 0xc
test esi, esi
je 0x680a9d
push 0x3a
push esi
call fcn.00626500
mov esi, eax
add esp, 8
test esi, esi
je 0x680a9d
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.00635198
push eax
call fcn.00661ec0
movzx eax, ax
push 0x2d
push esi
mov dword [esp + 0x3c], eax
call fcn.00626500
add esp, 0x18
test eax, eax
je 0x680a77
push 0xa
inc eax
push 0
push eax
call fcn.00635198
push eax
call fcn.00661ec0
movzx edx, ax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], edx
cmp ax, dx
jbe 0x680a9d
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x680a9d
mov eax, dword [esp + 0x24]
movzx eax, ax
mov dword [esp + 0x20], eax
jmp 0x680a9d
mov ecx, dword [esp + 0x18]
sub ecx, esi
lea ebx, [ebx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x680a90
mov esi, dword [esp + 0x18]
cmp byte [esi], 0
je 0x680af4
push 0x401
lea eax, [esp + 0x22c]
push eax
mov eax, dword [ebp + 0x48]
push esi
push dword [ebp + 0x500]
push dword [eax + 0x18]
call fcn.0068d500
add esp, 4
push eax
mov eax, dword [ebp + 0x48]
push dword [eax + 4]
call fcn.0045e240
add esp, 0x18
sub eax, 0
je 0x680aeb
dec eax
je 0x681087
dec eax
jne 0x680af4
jmp 0x680b91
mov eax, esi
jmp 0x680b98
xor esi, esi
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x80
push eax
lea eax, [esp + 0x38]
push eax
push dword [ebp + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x680b4a
push 0x100
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00672470
push eax
push str.getsockname___failed:__s
push edi
call fcn.0065f880
push esi
call dword [0x75ae20]
add esp, 0x1c
jmp 0x681087
mov ax, word [esp + 0x34]
push 0x401
cmp ax, 0x17
je 0x680b6d
lea ecx, [esp + 0x22c]
movzx eax, ax
push ecx
lea ecx, [esp + 0x40]
push ecx
push eax
jmp 0x680b7c
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x44]
push eax
push 0x17
call fcn.0068d5c0
add esp, 0x10
test eax, eax
je 0x681087
mov byte [esp + 0x13], 0
lea eax, [esp + 0x228]
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], eax
push ecx
push 0
push 0
push eax
push edi
call fcn.006683b0
add esp, 0x14
cmp eax, 1
jne 0x680bc2
lea eax, [esp + 0x30]
push eax
push edi
call fcn.00655f60
add esp, 8
mov eax, dword [esp + 0x30]
test eax, eax
je 0x68106e
mov ebp, dword [eax]
push eax
push edi
call fcn.006686f0
add esp, 8
test ebp, ebp
je 0x68106e
push esi
call dword [0x75ae20]
add esp, 4
mov dword [esp + 0x14], 0xffffffff
xor esi, esi
lea eax, [esp + 0x14]
push eax
push 0
push ebp
push edi
call fcn.00660f00
add esp, 0x10
mov dword [esp + 0x18], eax
test eax, eax
je 0x680c20
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x680bf6
jmp 0x680c24
test ebp, ebp
jne 0x680c4b
push 0x100
lea eax, [esp + 0x12c]
push eax
push esi
call fcn.00672470
push eax
push str.socket_failure:__s
push edi
call fcn.0065f880
add esp, 0x18
jmp 0x681087
push dword [ebp + 0x10]
lea eax, [esp + 0x38]
push dword [ebp + 0x18]
push eax
call fcn.00620420
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
cmp ax, word [esp + 0x20]
movzx esi, ax
ja 0x681050
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [esp + 0x2c]
mov word [esp + 0x3a], ax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x680da1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [esp + 0x13], 0
je 0x680d19
cmp eax, 0x2741
jne 0x680d19
push 0x100
lea eax, [esp + 0x12c]
push eax
push 0x2741
call fcn.00672470
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.0065f950
mov esi, dword [esp + 0x44]
lea eax, [esp + 0x48]
add esp, 0x1c
mov dword [esp + 0x2c], 0x80
push eax
lea eax, [esp + 0x38]
push eax
push dword [esi + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x680d30
mov eax, dword [esp + 0x24]
movzx esi, ax
cmp si, word [esp + 0x20]
mov byte [esp + 0x13], 0
jmp 0x680c71
cmp eax, 0x2740
je 0x680d25
cmp eax, 0xd
jne 0x680d68
inc esi
cmp si, word [esp + 0x20]
jmp 0x680c71
push 0x100
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00672470
push eax
push str.getsockname___failed:__s
push edi
call fcn.0065f880
push dword [esp + 0x2c]
push esi
push edi
call fcn.00660240
add esp, 0x24
jmp 0x681087
push 0x100
lea ecx, [esp + 0x12c]
push ecx
push eax
call fcn.00672470
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.0065f880
push dword [esp + 0x30]
push dword [esp + 0x48]
push edi
call fcn.00660240
add esp, 0x28
jmp 0x681087
cmp si, word [esp + 0x20]
ja 0x681050
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x80
push eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x680e07
push 0x100
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00672470
push eax
push str.getsockname___failed:__s
push edi
call fcn.0065f880
push dword [esp + 0x2c]
push dword [esp + 0x44]
push edi
call fcn.00660240
add esp, 0x24
jmp 0x681087
push 1
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x680e38
push 0x100
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00672470
push eax
push str.socket_failure:__s
jmp 0x680deb
push 0x2f
lea eax, [esp + 0xb8]
push eax
push ebp
call fcn.00668360
mov ebp, dword [esp + 0x34]
add esp, 0xc
cmp byte [ebp + 0x253], 0
jne 0x680e68
cmp byte [ebp + 0x24c], 0
je 0x680e68
mov byte [ebp + 0x253], 1
cmp ebx, 2
je 0x680eca
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x34]
jmp 0x680e80
cmp byte [ebp + 0x253], 0
jne 0x680e8d
test ebx, ebx
je 0x680ec4
cmp ebx, 1
jne 0x680e98
cmp cx, 2
jne 0x680ec4
movzx eax, cx
sub eax, 2
je 0x680ea5
sub eax, 0x15
jne 0x680ec4
push dword [esp + 0x36]
call esi
movzx eax, ax
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x680fd8
cmp ebx, 1
je 0x680f27
mov cx, word [esp + 0x34]
inc ebx
cmp ebx, 2
jne 0x680e80
mov esi, dword [esp + 0x18]
mov dword [ebp + 0x498], ebx
mov eax, dword [ebp + 0x134]
cmp eax, 0xffffffff
je 0x680ef4
push eax
push ebp
push edi
call fcn.00660240
add esp, 0xc
mov dword [ebp + 0x134], 0xffffffff
mov byte [ebp + 0x23d], 0
mov byte [ebp + 0x23f], 0
mov eax, dword [esp + 0x14]
mov dword [ebp + 0x134], eax
mov byte [ebp + 0x23d], 1
mov eax, dword [edi + 0xc]
mov dword [eax + 0x4a4], 0x1c
mov eax, esi
jmp 0x68108c
lea edx, [esp + 0xe4]
mov ebp, 0x2c
lea esi, [esp + 0xb4]
lea ebx, [ebx]
mov cl, byte [esi]
test cl, cl
je 0x680f55
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebp
mov byte [edx], al
inc edx
inc esi
jne 0x680f40
mov eax, dword [esp + 0x1c]
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.00670b10
mov ebp, dword [esp + 0x3c]
lea eax, [esp + 0xf8]
push eax
push str.PORT
push 0x70508c
lea eax, [ebp + 0x420]
push eax
push edi
call fcn.00695e30
mov esi, eax
add esp, 0x28
test esi, esi
je 0x680ece
push esi
call fcn.006725e0
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.0065f880
push dword [esp + 0x24]
push ebp
push edi
call fcn.00660240
mov eax, dword [edi + 0xc]
add esp, 0x1c
mov dword [eax + 0x4a4], 0
mov eax, esi
jmp 0x68108c
movzx eax, ax
push eax
lea eax, [esp + 0xb8]
push eax
xor eax, eax
cmp word [esp + 0x3c], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
lea eax, [ebp + 0x420]
push eax
push edi
call fcn.00695e30
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x680ece
push esi
call fcn.006725e0
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.0065f880
push dword [esp + 0x24]
push ebp
push edi
call fcn.00660240
mov dword [ebp + 0x498], 1
add esp, 0x1c
mov eax, dword [edi + 0xc]
mov dword [eax + 0x4a4], 0
mov eax, esi
jmp 0x68108c
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.0065f880
push dword [esp + 0x1c]
push dword [esp + 0x34]
push edi
call fcn.00660240
add esp, 0x14
jmp 0x681087
push dword [esp + 0x18]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.0065f880
push esi
call dword [0x75ae20]
add esp, 0x10
mov eax, 0x1e
mov ecx, dword [esp + 0x62c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00622d3e
add esp, 0x620
ret