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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9a4
push ebx
mov ebx, dword [edi]
push esi
push 0xff
lea eax, [ebp - 0x19f]
push 0
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 0xffffffff
mov byte [ebp - 0x1a0], 0
call fcn.10230cc0
mov esi, dword [ebx + 0x3a4]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebx + 0x3a4]
add esp, 0xc
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0xc], ecx
cmp eax, ecx
je 0x1021473a
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10214630
sub eax, edx
cmp eax, 1
jbe 0x1021473a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10214647
sub eax, edx
cmp eax, 0x16
jae 0x1021465c
mov eax, 0x16
jmp 0x1021466a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10214661
sub eax, edx
inc eax
push 1
push eax
call dword [0x102d99c4]
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x10214689
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
jne 0x1021479c
mov ebx, esi
test ebx, ebx
je 0x102146fc
push 0x3a
push ebx
call fcn.10236220
mov esi, eax
add esp, 8
test esi, esi
je 0x102146fc
push 0xa
lea eax, [esi + 1]
push 0
push eax
call fcn.10236719
push eax
call fcn.102007f0
movzx ebx, ax
push 0x2d
push esi
mov dword [ebp - 0x18], ebx
call fcn.10236220
add esp, 0x18
test eax, eax
je 0x102147d7
push 0xa
inc eax
push 0
push eax
call fcn.10236719
push eax
call fcn.102007f0
movzx eax, ax
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp bx, ax
jbe 0x102146fc
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0xc]
cmp byte [ebx], 0
je 0x1021473a
mov eax, dword [edi + 0x88]
mov ecx, dword [edi + 0x4c]
push 0x401
lea edx, [ebp - 0x5a4]
push edx
mov edx, dword [ecx + 4]
push ebx
push eax
push edx
call fcn.1004e9d0
add esp, 0x14
sub eax, 0
je 0x102147e2
dec eax
je 0x10214791
dec eax
je 0x10214813
mov edx, dword [edi + 0x150]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0xa0]
push ecx
push edx
mov dword [ebp - 0x10], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x102147e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.102075f0
push eax
mov eax, dword [ebp - 8]
push str.getsockname___failed:__s
push eax
call fcn.101fa7b0
mov eax, dword [ebp - 0xc]
add esp, 0x14
test eax, eax
je 0x10214791
push eax
call dword [0x102d99b8]
add esp, 4
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
push 0x3a
push esi
call fcn.10236220
mov edx, dword [ebp - 0xc]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x102147c4
mov ecx, ebx
sub ecx, esi
push ecx
push esi
push edx
call fcn.10234ef0
add esp, 0xc
jmp 0x10214694
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x102147c8
jmp 0x102146fc
movzx ecx, bx
mov dword [ebp - 0x14], ecx
jmp 0x102146fc
mov esi, ebx
jmp 0x10214819
movzx eax, word [ebp - 0xa0]
push 0x401
lea ecx, [ebp - 0x5a4]
push ecx
lea edx, [ebp - 0x9c]
push edx
push eax
call fcn.102087e0
mov ebx, dword [ebp - 0xc]
add esp, 0x10
mov dword [ebp - 0x20], 0
lea esi, [ebp - 0x5a4]
lea ecx, [ebp - 0x1c]
push ecx
push 0
push esi
push edi
call fcn.101f3d40
add esp, 0x10
cmp eax, 1
jne 0x1021483b
lea edx, [ebp - 0x1c]
push edx
push edi
call fcn.101f2fc0
add esp, 8
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10214858
mov ebx, dword [eax]
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.101f3f30
add esp, 8
test ebx, ebx
jne 0x10214887
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.101fa7b0
add esp, 0xc
test ebx, ebx
je 0x10214791
push ebx
call dword [0x102d99b8]
add esp, 4
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10214898
push eax
call dword [0x102d99b8]
add esp, 4
mov dword [ebp - 4], 0xffffffff
xor esi, esi
lea edx, [ebp - 4]
push edx
push 0
push ebx
push edi
call fcn.101fd540
add esp, 0x10
mov dword [ebp - 0xc], eax
test eax, eax
je 0x102148c9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov esi, eax
test ebx, ebx
jne 0x102148a1
jmp 0x102148cd
test ebx, ebx
jne 0x102148f1
push esi
push edi
call fcn.102075f0
push eax
mov eax, dword [ebp - 8]
push str.socket_failure:__s
push eax
call fcn.101fa7b0
add esp, 0x14
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x18]
push ecx
push edx
lea eax, [ebp - 0xa0]
push eax
call fcn.10230070
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebx + 0x10]
add esp, 0xc
mov dword [ebp - 0x10], ecx
movzx esi, ax
cmp ax, word [ebp - 0x14]
ja 0x10214a36
mov edi, edi
cmp word [ebp - 0xa0], 2
jne 0x10214938
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x9e], ax
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push edx
lea eax, [ebp - 0xa0]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10214a30
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x20], 0
je 0x102149b1
cmp eax, 0x2741
jne 0x102149b1
push eax
push edi
call fcn.102075f0
push eax
mov eax, dword [ebp - 8]
movzx edx, si
push edx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push eax
call fcn.101fa700
mov eax, dword [edi + 0x150]
add esp, 0x18
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0xa0]
push edx
push eax
mov dword [ebp - 0x10], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x102149ca
movzx esi, word [ebp - 0x18]
mov dword [ebp - 0x20], eax
jmp 0x102149be
cmp eax, 0x2740
je 0x102149bd
cmp eax, 0xd
jne 0x102149fe
inc esi
cmp si, word [ebp - 0x14]
jbe 0x10214920
jmp 0x10214a36
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.102075f0
mov ecx, dword [ebp - 8]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.101fa7b0
mov edx, dword [ebp - 4]
push edx
push edi
call fcn.101fd4e0
add esp, 0x1c
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push edi
call fcn.102075f0
mov ecx, dword [ebp - 8]
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push ecx
call fcn.101fa7b0
mov edx, dword [ebp - 4]
push edx
push edi
call fcn.101fd4e0
add esp, 0x20
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
cmp si, word [ebp - 0x14]
jbe 0x10214a5c
mov eax, dword [ebp - 8]
push str.bind___failed__we_ran_out_of_ports_
push eax
call fcn.101fa7b0
mov ecx, dword [ebp - 4]
push ecx
push edi
call fcn.101fd4e0
add esp, 0x10
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0xa0]
push eax
push ecx
mov dword [ebp - 0x10], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10214ab0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.102075f0
push eax
push str.getsockname___failed:__s
mov edx, dword [ebp - 8]
push edx
call fcn.101fa7b0
mov eax, dword [ebp - 4]
push eax
push edi
call fcn.101fd4e0
add esp, 0x1c
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x10214ad5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.102075f0
push eax
push str.socket_failure:__s
jmp 0x10214a8f
push 0x100
lea ecx, [ebp - 0x1a0]
push ecx
push ebx
call fcn.101f3ad0
mov esi, dword [ebp + 8]
add esp, 0xc
cmp esi, 2
je 0x10214b4a
mov cx, word [ebp - 0xa0]
lea esp, [esp]
cmp dword [edi + 0x224], 0
jne 0x10214b0d
test esi, esi
je 0x10214b44
cmp esi, 1
jne 0x10214b18
cmp cx, 2
jne 0x10214b44
movzx eax, cx
sub eax, 2
jne 0x10214b44
mov edx, dword [ebp - 0x9e]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
test esi, esi
je 0x10214b52
cmp esi, 1
je 0x10214bca
mov cx, word [ebp - 0xa0]
inc esi
cmp esi, 2
jne 0x10214b00
mov ebx, dword [ebp - 0xc]
jmp 0x10214c67
xor edx, edx
cmp word [ebp - 0xa0], 2
push ebx
setne dl
lea ecx, [ebp - 0x1a0]
push ecx
mov dword [ebp + 8], esi
lea esi, [edi + 0x408]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push esi
call fcn.10220c50
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x10214c64
push ebx
call fcn.10206c10
push eax
mov eax, dword [ebp - 8]
push str.Failure_sending_EPRT_command:__s
push eax
call fcn.101fa7b0
mov ecx, dword [ebp - 4]
push ecx
push edi
call fcn.101fd4e0
add esp, 0x18
mov dword [esi + 0x68], 1
pop esi
mov eax, ebx
mov dword [edi + 0x47c], 0
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x9a4]
lea edx, [ebp - 0x1a0]
mov al, byte [edx]
test al, al
je 0x10214beb
cmp al, 0x2e
jne 0x10214be5
mov byte [ecx], 0x2c
jmp 0x10214be7
mov byte [ecx], al
inc ecx
inc edx
jne 0x10214bd6
mov eax, ebx
mov edx, ebx
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.10206140
lea eax, [ebp - 0x9a4]
push eax
push str.PORT
lea eax, [edi + 0x408]
push 0x102a8ef4
push eax
call fcn.10220c50
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x10214c67
push ebx
call fcn.10206c10
mov ecx, dword [ebp - 8]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.101fa7b0
mov edx, dword [ebp - 4]
push edx
push edi
call fcn.101fd4e0
add esp, 0x18
pop esi
mov eax, ebx
mov dword [edi + 0x47c], 0
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov dword [edi + 0x470], esi
mov eax, dword [edi + 0x154]
cmp eax, 0xffffffff
je 0x10214c82
push eax
push edi
call fcn.101fd4e0
add esp, 8
mov eax, dword [ebp - 4]
mov dword [edi + 0x154], eax
pop esi
mov dword [edi + 0x208], 1
mov eax, ebx
mov dword [edi + 0x47c], 0x1c
pop ebx
mov esp, ebp
pop ebp
ret